@silasfmartins/testhub 1.0.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.
Files changed (296) hide show
  1. package/.github/copilot-instructions.md +520 -0
  2. package/biome.json +37 -0
  3. package/dist/index.d.ts +45 -0
  4. package/dist/index.js +169 -0
  5. package/dist/scripts/consumer-postinstall.d.ts +15 -0
  6. package/dist/scripts/consumer-postinstall.js +785 -0
  7. package/dist/scripts/generate-docs.d.ts +16 -0
  8. package/dist/scripts/generate-docs.js +1363 -0
  9. package/dist/scripts/generate-index.d.ts +2 -0
  10. package/dist/scripts/generate-index.js +314 -0
  11. package/dist/scripts/init-api.d.ts +2 -0
  12. package/dist/scripts/init-api.js +525 -0
  13. package/dist/scripts/init-banco.d.ts +2 -0
  14. package/dist/scripts/init-banco.js +347 -0
  15. package/dist/scripts/init-frontend.d.ts +2 -0
  16. package/dist/scripts/init-frontend.js +627 -0
  17. package/dist/scripts/init-mobile.d.ts +2 -0
  18. package/dist/scripts/init-mobile.js +481 -0
  19. package/dist/scripts/init-scenarios.d.ts +2 -0
  20. package/dist/scripts/init-scenarios.js +846 -0
  21. package/dist/scripts/init-ssh.d.ts +2 -0
  22. package/dist/scripts/init-ssh.js +639 -0
  23. package/dist/scripts/package-versions.d.ts +57 -0
  24. package/dist/scripts/package-versions.js +768 -0
  25. package/dist/scripts/postinstall.d.ts +1 -0
  26. package/dist/scripts/postinstall.js +527 -0
  27. package/dist/scripts/robust-build.d.ts +7 -0
  28. package/dist/scripts/robust-build.js +88 -0
  29. package/dist/scripts/setup-local-packages.d.ts +31 -0
  30. package/dist/scripts/setup-local-packages.js +237 -0
  31. package/dist/scripts/smart-override.d.ts +2 -0
  32. package/dist/scripts/smart-override.js +1360 -0
  33. package/dist/scripts/sync-configs.d.ts +27 -0
  34. package/dist/scripts/sync-configs.js +248 -0
  35. package/dist/scripts/test-biome-parse.d.ts +5 -0
  36. package/dist/scripts/test-biome-parse.js +84 -0
  37. package/dist/scripts/ultracite-setup.d.ts +4 -0
  38. package/dist/scripts/ultracite-setup.js +310 -0
  39. package/dist/scripts/update-all-init-scripts.d.ts +2 -0
  40. package/dist/scripts/update-all-init-scripts.js +52 -0
  41. package/dist/scripts/update-biome-schema.d.ts +15 -0
  42. package/dist/scripts/update-biome-schema.js +124 -0
  43. package/dist/src/AutoCoreFacade.d.ts +145 -0
  44. package/dist/src/AutoCoreFacade.js +217 -0
  45. package/dist/src/api/ApiActions.d.ts +297 -0
  46. package/dist/src/api/ApiActions.js +1905 -0
  47. package/dist/src/api/Certificate.d.ts +60 -0
  48. package/dist/src/api/Certificate.js +79 -0
  49. package/dist/src/api/JsonResponse.d.ts +116 -0
  50. package/dist/src/api/JsonResponse.js +206 -0
  51. package/dist/src/appium/DeviceFarmViewer.d.ts +79 -0
  52. package/dist/src/appium/DeviceFarmViewer.js +1083 -0
  53. package/dist/src/appium/MobileActions.d.ts +347 -0
  54. package/dist/src/appium/MobileActions.js +1632 -0
  55. package/dist/src/appium/MobileConnection.d.ts +160 -0
  56. package/dist/src/appium/MobileConnection.js +772 -0
  57. package/dist/src/config/envLoader.d.ts +123 -0
  58. package/dist/src/config/envLoader.js +361 -0
  59. package/dist/src/config/jest-safe-setup.d.ts +19 -0
  60. package/dist/src/config/jest-safe-setup.js +369 -0
  61. package/dist/src/config/timeouts.d.ts +32 -0
  62. package/dist/src/config/timeouts.js +38 -0
  63. package/dist/src/desktop/DesktopActions.d.ts +46 -0
  64. package/dist/src/desktop/DesktopActions.js +398 -0
  65. package/dist/src/desktop/DesktopConnection.d.ts +32 -0
  66. package/dist/src/desktop/DesktopConnection.js +84 -0
  67. package/dist/src/domain/entities/TestExecution.d.ts +117 -0
  68. package/dist/src/domain/entities/TestExecution.js +150 -0
  69. package/dist/src/domain/entities/TestReport.d.ts +114 -0
  70. package/dist/src/domain/entities/TestReport.js +179 -0
  71. package/dist/src/domain/repositories/ITestRepository.d.ts +196 -0
  72. package/dist/src/domain/repositories/ITestRepository.js +14 -0
  73. package/dist/src/domain/schemas/ValidationSchemas.d.ts +159 -0
  74. package/dist/src/domain/schemas/ValidationSchemas.js +181 -0
  75. package/dist/src/functions/errors/BaseError.d.ts +78 -0
  76. package/dist/src/functions/errors/BaseError.js +245 -0
  77. package/dist/src/functions/errors/ConfigurationError.d.ts +16 -0
  78. package/dist/src/functions/errors/ConfigurationError.js +48 -0
  79. package/dist/src/functions/errors/ErrorCatalog.d.ts +148 -0
  80. package/dist/src/functions/errors/ErrorCatalog.js +157 -0
  81. package/dist/src/functions/errors/GlobalErrorHandler.d.ts +101 -0
  82. package/dist/src/functions/errors/GlobalErrorHandler.js +281 -0
  83. package/dist/src/functions/errors/IntegrationError.d.ts +17 -0
  84. package/dist/src/functions/errors/IntegrationError.js +51 -0
  85. package/dist/src/functions/errors/SecurityError.d.ts +14 -0
  86. package/dist/src/functions/errors/SecurityError.js +42 -0
  87. package/dist/src/functions/errors/SystemError.d.ts +12 -0
  88. package/dist/src/functions/errors/SystemError.js +36 -0
  89. package/dist/src/functions/errors/ValidationError.d.ts +14 -0
  90. package/dist/src/functions/errors/ValidationError.js +61 -0
  91. package/dist/src/functions/errors/index.d.ts +12 -0
  92. package/dist/src/functions/errors/index.js +13 -0
  93. package/dist/src/global-setup.d.ts +1 -0
  94. package/dist/src/global-setup.js +1037 -0
  95. package/dist/src/helpers/BancoActions.d.ts +188 -0
  96. package/dist/src/helpers/BancoActions.js +581 -0
  97. package/dist/src/helpers/EnviromentHelper.d.ts +17 -0
  98. package/dist/src/helpers/EnviromentHelper.js +66 -0
  99. package/dist/src/helpers/ParallelExecutionHelper.d.ts +183 -0
  100. package/dist/src/helpers/ParallelExecutionHelper.js +375 -0
  101. package/dist/src/helpers/SyncSignal.d.ts +15 -0
  102. package/dist/src/helpers/SyncSignal.js +44 -0
  103. package/dist/src/hubdocs/CategoryDetector.d.ts +83 -0
  104. package/dist/src/hubdocs/CategoryDetector.js +401 -0
  105. package/dist/src/hubdocs/DirectStatementInterceptor.d.ts +54 -0
  106. package/dist/src/hubdocs/DirectStatementInterceptor.js +243 -0
  107. package/dist/src/hubdocs/ExecutionTracker.d.ts +107 -0
  108. package/dist/src/hubdocs/ExecutionTracker.js +702 -0
  109. package/dist/src/hubdocs/HubDocs.d.ts +395 -0
  110. package/dist/src/hubdocs/HubDocs.js +3586 -0
  111. package/dist/src/hubdocs/StatementMethodFilter.d.ts +71 -0
  112. package/dist/src/hubdocs/StatementMethodFilter.js +618 -0
  113. package/dist/src/hubdocs/StatementTracker.d.ts +417 -0
  114. package/dist/src/hubdocs/StatementTracker.js +2419 -0
  115. package/dist/src/hubdocs/SwaggerGenerator.d.ts +59 -0
  116. package/dist/src/hubdocs/SwaggerGenerator.js +405 -0
  117. package/dist/src/hubdocs/index.d.ts +9 -0
  118. package/dist/src/hubdocs/index.js +9 -0
  119. package/dist/src/hubdocs/types.d.ts +114 -0
  120. package/dist/src/hubdocs/types.js +5 -0
  121. package/dist/src/infrastructure/DependencyContainer.d.ts +142 -0
  122. package/dist/src/infrastructure/DependencyContainer.js +250 -0
  123. package/dist/src/infrastructure/adapters/AppiumAdapter.d.ts +168 -0
  124. package/dist/src/infrastructure/adapters/AppiumAdapter.js +468 -0
  125. package/dist/src/infrastructure/adapters/OracleAdapter.d.ts +150 -0
  126. package/dist/src/infrastructure/adapters/OracleAdapter.js +388 -0
  127. package/dist/src/infrastructure/adapters/PlaywrightAdapter.d.ts +192 -0
  128. package/dist/src/infrastructure/adapters/PlaywrightAdapter.js +382 -0
  129. package/dist/src/infrastructure/adapters/SSHAdapter.d.ts +141 -0
  130. package/dist/src/infrastructure/adapters/SSHAdapter.js +428 -0
  131. package/dist/src/interfaces.d.ts +501 -0
  132. package/dist/src/interfaces.js +25 -0
  133. package/dist/src/internal/fakes/__fake-actions__.d.ts +17 -0
  134. package/dist/src/internal/fakes/__fake-actions__.js +21 -0
  135. package/dist/src/internal/fakes/__forbidden__.d.ts +10 -0
  136. package/dist/src/internal/fakes/__forbidden__.js +18 -0
  137. package/dist/src/internal/fakes/__honeypot__.d.ts +15 -0
  138. package/dist/src/internal/fakes/__honeypot__.js +24 -0
  139. package/dist/src/octane/OctaneReporter.d.ts +13 -0
  140. package/dist/src/octane/OctaneReporter.js +61 -0
  141. package/dist/src/playwright/CryptoActions.d.ts +20 -0
  142. package/dist/src/playwright/CryptoActions.js +75 -0
  143. package/dist/src/playwright/EnhancedWebActions.d.ts +7 -0
  144. package/dist/src/playwright/EnhancedWebActions.js +65 -0
  145. package/dist/src/playwright/WebActions.d.ts +1599 -0
  146. package/dist/src/playwright/WebActions.js +11788 -0
  147. package/dist/src/playwright/actions/ActionTimeline.d.ts +36 -0
  148. package/dist/src/playwright/actions/ActionTimeline.js +101 -0
  149. package/dist/src/playwright/actions/RecoveryQueue.d.ts +82 -0
  150. package/dist/src/playwright/actions/RecoveryQueue.js +130 -0
  151. package/dist/src/playwright/actions/SelectorCache.d.ts +53 -0
  152. package/dist/src/playwright/actions/SelectorCache.js +96 -0
  153. package/dist/src/playwright/actions/index.d.ts +13 -0
  154. package/dist/src/playwright/actions/index.js +14 -0
  155. package/dist/src/playwright/actions/types.d.ts +147 -0
  156. package/dist/src/playwright/actions/types.js +5 -0
  157. package/dist/src/playwright/fixtures.d.ts +112 -0
  158. package/dist/src/playwright/fixtures.js +718 -0
  159. package/dist/src/playwright/network-logs-reporter.d.ts +7 -0
  160. package/dist/src/playwright/network-logs-reporter.js +66 -0
  161. package/dist/src/playwright/registerRecoveryWrappers.d.ts +1 -0
  162. package/dist/src/playwright/registerRecoveryWrappers.js +54 -0
  163. package/dist/src/security/BuildSecurity.d.ts +12 -0
  164. package/dist/src/security/BuildSecurity.js +138 -0
  165. package/dist/src/security/EulaProtection.d.ts +70 -0
  166. package/dist/src/security/EulaProtection.js +155 -0
  167. package/dist/src/security/HoneypotManager.d.ts +46 -0
  168. package/dist/src/security/HoneypotManager.js +234 -0
  169. package/dist/src/security/KeysManager.d.ts +36 -0
  170. package/dist/src/security/KeysManager.js +158 -0
  171. package/dist/src/security/ProofOfWorkIntegration.d.ts +64 -0
  172. package/dist/src/security/ProofOfWorkIntegration.js +206 -0
  173. package/dist/src/security/SecurityValidation.d.ts +21 -0
  174. package/dist/src/security/SecurityValidation.js +163 -0
  175. package/dist/src/security/SourceMapProtection.d.ts +55 -0
  176. package/dist/src/security/SourceMapProtection.js +220 -0
  177. package/dist/src/security/protector.d.ts +1 -0
  178. package/dist/src/security/protector.js +97 -0
  179. package/dist/src/ssh/SSHActions.d.ts +262 -0
  180. package/dist/src/ssh/SSHActions.js +790 -0
  181. package/dist/src/ssh/SSHClient.d.ts +99 -0
  182. package/dist/src/ssh/SSHClient.js +409 -0
  183. package/dist/src/statements/BaseStatement.d.ts +38 -0
  184. package/dist/src/statements/BaseStatement.js +78 -0
  185. package/dist/src/testContext/AuthStateManager.d.ts +93 -0
  186. package/dist/src/testContext/AuthStateManager.js +256 -0
  187. package/dist/src/testContext/CoverageManager.d.ts +198 -0
  188. package/dist/src/testContext/CoverageManager.js +917 -0
  189. package/dist/src/testContext/TestAnnotations.d.ts +476 -0
  190. package/dist/src/testContext/TestAnnotations.js +2647 -0
  191. package/dist/src/testContext/TestContext.d.ts +138 -0
  192. package/dist/src/testContext/TestContext.js +369 -0
  193. package/dist/src/testContext/UnifiedHtmlGenerator.d.ts +7 -0
  194. package/dist/src/testContext/UnifiedHtmlGenerator.js +264 -0
  195. package/dist/src/testContext/UnifiedReportManager.d.ts +211 -0
  196. package/dist/src/testContext/UnifiedReportManager.js +1206 -0
  197. package/dist/src/testhub/DynamicConfigManager.d.ts +121 -0
  198. package/dist/src/testhub/DynamicConfigManager.js +320 -0
  199. package/dist/src/testhub/SystemsManager.d.ts +119 -0
  200. package/dist/src/testhub/SystemsManager.js +365 -0
  201. package/dist/src/testhub/TestHubClient.d.ts +335 -0
  202. package/dist/src/testhub/TestHubClient.js +1215 -0
  203. package/dist/src/testhub/TestHubReporter.d.ts +62 -0
  204. package/dist/src/testhub/TestHubReporter.js +576 -0
  205. package/dist/src/testhub/TestHubVars.d.ts +116 -0
  206. package/dist/src/testhub/TestHubVars.js +273 -0
  207. package/dist/src/utils/ActionInterceptor.d.ts +59 -0
  208. package/dist/src/utils/ActionInterceptor.js +741 -0
  209. package/dist/src/utils/ArtifactsCompressor.d.ts +43 -0
  210. package/dist/src/utils/ArtifactsCompressor.js +181 -0
  211. package/dist/src/utils/AutoLogsFinal.d.ts +47 -0
  212. package/dist/src/utils/AutoLogsFinal.js +148 -0
  213. package/dist/src/utils/CodeGenSession.d.ts +114 -0
  214. package/dist/src/utils/CodeGenSession.js +264 -0
  215. package/dist/src/utils/ConfigLogger.d.ts +133 -0
  216. package/dist/src/utils/ConfigLogger.js +611 -0
  217. package/dist/src/utils/CustomReporter.d.ts +22 -0
  218. package/dist/src/utils/CustomReporter.js +352 -0
  219. package/dist/src/utils/DataStore.d.ts +171 -0
  220. package/dist/src/utils/DataStore.js +484 -0
  221. package/dist/src/utils/DatabaseInterceptor.d.ts +19 -0
  222. package/dist/src/utils/DatabaseInterceptor.js +295 -0
  223. package/dist/src/utils/DateHelper.d.ts +16 -0
  224. package/dist/src/utils/DateHelper.js +120 -0
  225. package/dist/src/utils/DateValidator.d.ts +4 -0
  226. package/dist/src/utils/DateValidator.js +51 -0
  227. package/dist/src/utils/DocumentGenerator.d.ts +35 -0
  228. package/dist/src/utils/DocumentGenerator.js +129 -0
  229. package/dist/src/utils/EvidenceCapture.d.ts +90 -0
  230. package/dist/src/utils/EvidenceCapture.js +600 -0
  231. package/dist/src/utils/EvidenceReportGenerator.d.ts +70 -0
  232. package/dist/src/utils/EvidenceReportGenerator.js +799 -0
  233. package/dist/src/utils/FrameManagementUtil.d.ts +42 -0
  234. package/dist/src/utils/FrameManagementUtil.js +75 -0
  235. package/dist/src/utils/GlobalStatementsInterceptor.d.ts +1 -0
  236. package/dist/src/utils/GlobalStatementsInterceptor.js +1 -0
  237. package/dist/src/utils/HTMLTemplate.d.ts +1 -0
  238. package/dist/src/utils/HTMLTemplate.js +1034 -0
  239. package/dist/src/utils/InterceptacaoMagica.d.ts +23 -0
  240. package/dist/src/utils/InterceptacaoMagica.js +365 -0
  241. package/dist/src/utils/LogSanitizer.d.ts +35 -0
  242. package/dist/src/utils/LogSanitizer.js +110 -0
  243. package/dist/src/utils/Logger.d.ts +65 -0
  244. package/dist/src/utils/Logger.js +284 -0
  245. package/dist/src/utils/McpLocalClient.d.ts +141 -0
  246. package/dist/src/utils/McpLocalClient.js +871 -0
  247. package/dist/src/utils/PDFEvidenceGenerator.d.ts +20 -0
  248. package/dist/src/utils/PDFEvidenceGenerator.js +156 -0
  249. package/dist/src/utils/SpecFileAnalyzer.d.ts +35 -0
  250. package/dist/src/utils/SpecFileAnalyzer.js +209 -0
  251. package/dist/src/utils/StatementInterceptor.d.ts +18 -0
  252. package/dist/src/utils/StatementInterceptor.js +87 -0
  253. package/dist/src/utils/StatementLogger.d.ts +33 -0
  254. package/dist/src/utils/StatementLogger.js +113 -0
  255. package/dist/src/utils/StatementsInterceptor.d.ts +1 -0
  256. package/dist/src/utils/StatementsInterceptor.js +1 -0
  257. package/dist/src/utils/TeamsFlushHook.d.ts +17 -0
  258. package/dist/src/utils/TeamsFlushHook.js +168 -0
  259. package/dist/src/utils/TerminalLogCapture.d.ts +158 -0
  260. package/dist/src/utils/TerminalLogCapture.js +531 -0
  261. package/dist/src/utils/TestMethodLogger.d.ts +70 -0
  262. package/dist/src/utils/TestMethodLogger.js +95 -0
  263. package/dist/src/utils/UnifiedTeardown.d.ts +4 -0
  264. package/dist/src/utils/UnifiedTeardown.js +400 -0
  265. package/dist/src/utils/XPathCatalog.d.ts +152 -0
  266. package/dist/src/utils/XPathCatalog.js +350 -0
  267. package/dist/src/utils/generators.d.ts +90 -0
  268. package/dist/src/utils/generators.js +167 -0
  269. package/dist/src/utils/testRecovery/ResilientPlaywright.d.ts +152 -0
  270. package/dist/src/utils/testRecovery/ResilientPlaywright.js +715 -0
  271. package/dist/src/utils/testRecovery/TestRecoveryClient.d.ts +801 -0
  272. package/dist/src/utils/testRecovery/TestRecoveryClient.js +1415 -0
  273. package/dist/src/utils/testRecovery/autoFixCode.d.ts +65 -0
  274. package/dist/src/utils/testRecovery/autoFixCode.js +32 -0
  275. package/dist/vitest.config.d.ts +2 -0
  276. package/dist/vitest.config.js +59 -0
  277. package/dist/wdio.conf.d.ts +1 -0
  278. package/dist/wdio.conf.js +420 -0
  279. package/package.json +137 -0
  280. package/protect-loader.mjs +643 -0
  281. package/scripts/consumer-postinstall.ts +975 -0
  282. package/scripts/generate-index.ts +343 -0
  283. package/scripts/init-api.ts +613 -0
  284. package/scripts/init-banco.ts +437 -0
  285. package/scripts/init-frontend.ts +727 -0
  286. package/scripts/init-mobile.ts +558 -0
  287. package/scripts/init-scenarios.ts +925 -0
  288. package/scripts/init-ssh.ts +734 -0
  289. package/scripts/package-versions.ts +978 -0
  290. package/scripts/postinstall.ts +605 -0
  291. package/scripts/smart-override.ts +1675 -0
  292. package/scripts/sync-configs.ts +302 -0
  293. package/scripts/ultracite-setup.ts +370 -0
  294. package/src/types/globals.d.ts +48 -0
  295. package/tsconfig.json +29 -0
  296. package/types/autocore-sync-signal.d.ts +10 -0
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,639 @@
1
+ #!/usr/bin/env node
2
+ // @ts-nocheck
3
+ import fs from 'node:fs';
4
+ import { execSync } from 'child_process';
5
+ import yaml from 'js-yaml';
6
+ import path from 'path';
7
+ import { generateBiomeConfigString, generatePackageJson, generateTsConfigForProject, generateVitestConfigString, getLatestVersions, } from './package-versions.js';
8
+ import { setupUltracite } from './ultracite-setup.js';
9
+ const root = process.cwd();
10
+ const catalogPath = path.join(root, 'catalog-info.yaml');
11
+ if (!fs.existsSync(catalogPath)) {
12
+ console.error('❌ Arquivo catalog-info.yaml não encontrado.');
13
+ process.exit(1);
14
+ }
15
+ const catalog = yaml.load(fs.readFileSync(catalogPath, 'utf-8'));
16
+ const projectName = catalog?.metadata?.name || 'meu-projeto';
17
+ const projectNameUnderscore = projectName.replace(/-/g, '_');
18
+ const write = (filePath, content) => {
19
+ const fullPath = path.join(root, filePath);
20
+ fs.mkdirSync(path.dirname(fullPath), { recursive: true });
21
+ fs.writeFileSync(fullPath, content);
22
+ };
23
+ async function main() {
24
+ console.log('🚀 Inicializando projeto SSH com versões atualizadas...');
25
+ console.log(`📦 Projeto: ${projectName}`);
26
+ console.log('');
27
+ // ✅ Buscar versões mais recentes
28
+ const versions = await getLatestVersions();
29
+ // ✅ Gerar package.json com versões atualizadas
30
+ const packageJsonContent = generatePackageJson(projectName, 'ssh', versions);
31
+ // ✅ Gerar tsconfig.json baseado no AutoCore
32
+ const tsconfigContent = generateTsConfigForProject('ssh');
33
+ // ✅ Gerar vitest.config.ts baseado no AutoCore (NOVO!)
34
+ const vitestConfigContent = generateVitestConfigString('ssh');
35
+ // ✅ Gerar biome.json sincronizado com AutoCore
36
+ const biomeConfigContent = generateBiomeConfigString();
37
+ console.log('📝 Criando arquivos do projeto...');
38
+ // package.json com versões dinâmicas
39
+ write('package.json', JSON.stringify(packageJsonContent, null, 2));
40
+ // ✅ tsconfig.json sempre sincronizado com o AutoCore
41
+ write('tsconfig.json', JSON.stringify(tsconfigContent, null, 2));
42
+ // ✅ biome.json sincronizado automaticamente com o AutoCore
43
+ write('biome.json', biomeConfigContent);
44
+ // playwright.config.ts
45
+ write('playwright.config.ts', `import { defineConfig } from '@playwright/test'
46
+ export default defineConfig({
47
+ globalSetup: '@silasfmartins/testhub/setup',
48
+ reporter: [
49
+ ['list'],
50
+ ['html', { open: 'never' }],
51
+ ['@silasfmartins/testhub/reporter'],
52
+ ],
53
+ testDir: './tests',
54
+ testMatch: ['**/*.spec.ts', '**/*.test.ts'],
55
+ // Timeouts adequados para testes rápidos
56
+ timeout: 120_000,
57
+ expect: {
58
+ timeout: 60_000,
59
+ },
60
+ fullyParallel: false,
61
+ workers: 1,
62
+ retries: 0,
63
+ use: {
64
+ trace: 'on',
65
+ },
66
+ })
67
+ `);
68
+ // .npmrc
69
+ write('.npmrc', `registry=https://pkgs.dev.azure.com/telefonica-vivo-brasil/_packaging/DevOps/npm/registry/`);
70
+ // .gitignore
71
+ write('.gitignore', `# Playwright
72
+ node_modules/
73
+ /test-results/
74
+ /playwright-report/
75
+ /blob-report/
76
+ /playwright/.cache/
77
+
78
+ .vscode
79
+ .vscode/
80
+
81
+ # Tests e logs
82
+ /tests
83
+ /logs
84
+ docs
85
+ docs/
86
+
87
+ # Environment files
88
+ .env
89
+ .env.preprod
90
+ .env.esteira1
91
+ .env.esteira2
92
+ .env.prodlike
93
+
94
+ # AutoCore específicos
95
+ .test-data-store.json
96
+ .env.lock
97
+ .configlogger.lock
98
+ .rbqa
99
+ .rbqa/
100
+
101
+ # VS Code
102
+ .vscode/settings.json
103
+
104
+ # Biome
105
+ .biome.log
106
+
107
+ # Coverage
108
+ coverage/
109
+ *.lcov
110
+
111
+ # SSH específicos
112
+ *.pem
113
+ *.key
114
+ ssh_keys/
115
+ private_keys/`);
116
+ // Arquivo de environment padrão
117
+ write('.env', `# Arquivo que seleciona o ambiente a ser utilizado
118
+ ENV=preprod`);
119
+ // Arquivo de environment padrão
120
+ write('.env.preprod', `# Configurações de ambiente para preprod - SSH
121
+ SSH_HOST=
122
+ SSH_PORT=22
123
+ SSH_USER=
124
+ SSH_PASSWORD=
125
+ SSH_PRIVATE_KEY_PATH=
126
+ SSH_PASSPHRASE=
127
+ SSH_TIMEOUT=30000
128
+ # Adicione suas variáveis de SSH aqui`);
129
+ // Arquivo de environment esteira1
130
+ write('.env.esteira1', `# Configurações de ambiente para esteira1 - SSH
131
+ SSH_HOST=
132
+ SSH_PORT=22
133
+ SSH_USER=
134
+ SSH_PASSWORD=
135
+ SSH_PRIVATE_KEY_PATH=
136
+ SSH_PASSPHRASE=
137
+ SSH_TIMEOUT=30000
138
+ # Adicione suas variáveis de SSH aqui`);
139
+ // Arquivo de environment esteira2
140
+ write('.env.esteira2', `# Configurações de ambiente para esteira2 - SSH
141
+ SSH_HOST=
142
+ SSH_PORT=22
143
+ SSH_USER=
144
+ SSH_PASSWORD=
145
+ SSH_PRIVATE_KEY_PATH=
146
+ SSH_PASSPHRASE=
147
+ SSH_TIMEOUT=30000
148
+ # Adicione suas variáveis de SSH aqui`);
149
+ // Arquivo de environment prodlike
150
+ write('.env.prodlike', `# Configurações de ambiente para prodlike - SSH
151
+ SSH_HOST=
152
+ SSH_PORT=22
153
+ SSH_USER=
154
+ SSH_PASSWORD=
155
+ SSH_PRIVATE_KEY_PATH=
156
+ SSH_PASSPHRASE=
157
+ SSH_TIMEOUT=30000
158
+ # Adicione suas variáveis de SSH aqui`);
159
+ // Exemplo de statements SSH
160
+ write('src/statements/StatementsSSH.ts', `import { Logger, SSHActions, type SSHClient } from "@silasfmartins/testhub"
161
+
162
+ /**
163
+ * Executa o processo de consumo de voz VC1 via SSH
164
+ */
165
+ export class StatementsConsumeVoice {
166
+ async consumeVoiceVcOne(client: SSHClient) {
167
+ Logger.info("Iniciando processo de consumo de voz VC1")
168
+
169
+ // Executar comando LS
170
+ await client.write("ls", "Executando LS para listar diretórios")
171
+
172
+ // Ler resposta
173
+ const response = client.read("Lendo resultado do comando LS")
174
+
175
+ // Validar se contém LOGS
176
+ SSHActions.validateContains(
177
+ response,
178
+ "LOGS",
179
+ "Validando se diretório LOGS existe"
180
+ )
181
+ }
182
+ }`);
183
+ // Chave SSH
184
+ write('secrets/CHAVE_ACESSO.key', '');
185
+ // Exemplo de teste básico
186
+ write('tests/example.spec.ts', `/**
187
+ * ConectorSSH - SSH Test Runner
188
+ * Package: br.com.vivo
189
+ * Generated: 2026-01-13T19:26:21.843Z
190
+ */
191
+
192
+ import { test, TestAnnotations, type TestInfo } from '@silasfmartins/testhub'
193
+ import { ConectorSSH } from '../src/statements/StatementsSSH.js'
194
+
195
+ test.describe('SSH - criar Lead', () => {
196
+ TestAnnotations.stopOnFailure()
197
+ test('CT01 - criar Lead', async ({}, testInfo: TestInfo) => {
198
+ TestAnnotations.SSH.testInfo = testInfo
199
+ await TestAnnotations.setSystem('SANITY_SSH')
200
+ await new ConectorSSH().criarLead()
201
+ })
202
+ })`);
203
+ // Exemplo de teste sem chave
204
+ write('tests/example_sem_chave.spec.ts', `/**
205
+ * ConectorSSH - SSH Test Runner
206
+ * Package: br.com.vivo
207
+ * Generated: 2026-01-13T19:26:21.843Z
208
+ */
209
+
210
+ import { test, TestAnnotations, type TestInfo } from '@silasfmartins/testhub'
211
+ import { ConectorSSH } from '../src/statements/StatementsSSH.js'
212
+
213
+ test.describe('SSH - criar Lead', () => {
214
+ TestAnnotations.stopOnFailure()
215
+ test('CT01 - criar Lead', async ({}, testInfo: TestInfo) => {
216
+ TestAnnotations.SSH.testInfo = testInfo
217
+ await TestAnnotations.setSystem('SISTEMA')
218
+ await SSHActions.connectWithKey("CAMINHO_DA_CHAVE")
219
+ await new ConectorSSH().criarLead()
220
+ })
221
+ })`);
222
+ // Pipeline Azure DevOps
223
+ write('.azuredevops/azure-pipeline.yml', `trigger:
224
+ batch: true
225
+ branches:
226
+ include:
227
+ - 'master'
228
+ paths:
229
+ include:
230
+ - '*'
231
+ exclude:
232
+ - .azuredevops/*
233
+ - docs/*
234
+ - catalog-info.yaml
235
+ - mkdocs.yml
236
+ - scripts.py
237
+ - catalog/*
238
+
239
+ resources:
240
+ repositories:
241
+ - repository: CodePlay
242
+ name: DevOps/Vivo.CodePlay.Pipelines
243
+ type: git
244
+ ref: refs/heads/test-playwright
245
+ endpoint: CodePlay
246
+
247
+ pool:
248
+ name: GeneralPurposeLinuxAgentsCI
249
+
250
+ extends:
251
+ template: tech_products/qa/build/pipeline_node_npm.yml@CodePlay
252
+ parameters:
253
+ jobName: 'build_${projectNameUnderscore}_pkg'
254
+ commitSHA: '$(Build.SourceVersion)'
255
+ registryServiceConnection: 'ACR-DEVOPS'
256
+ govAppAcronym: ''
257
+ skipScan: false # Alterado para false para executar Fortify e SonarQube
258
+ `);
259
+ // SonarQube configuration
260
+ write('.azuredevops/sonar-project.properties', `################### NÃO ALTERAR!!! ###################
261
+ # Informações gerais sobre o projeto. #
262
+ # Todas as variáveis de ambiente são fornecidas pela #
263
+ # automação, não alterar! #
264
+ ######################################################
265
+
266
+ sonar.projectDescription=Projeto SSH com AutoCore
267
+ sonar.analysis.orgName=\${env.AZ_ORG_NAME}
268
+ sonar.analysis.buildAuthor=\${env.AZ_BUILD_AUTHOR}
269
+ sonar.scm.exclusions.disabled=false
270
+ sonar.scm.forceReloadAll=true
271
+ sonar.log.level=DEBUG
272
+ sonar.verbose=true
273
+ sonar.sourceEncoding=UTF-8
274
+
275
+ # Diretórios e arquivos relevantes para Node.js/TypeScript
276
+ sonar.sources=src
277
+ sonar.inclusions=**/*.ts
278
+ sonar.test.inclusions=**/*.spec.ts,**/*.test.ts
279
+ sonar.typescript.lcov.reportPaths=coverage/lcov.info
280
+ sonar.javascript.lcov.reportPaths=coverage/lcov.info
281
+
282
+ # Exclusões de cobertura e análise
283
+ sonar.exclusions=node_modules/**,dist/**,coverage/**,**/*.config.js,**/*.config.ts,**/*.key,**/*.pem
284
+ sonar.coverage.exclusions=**/*.d.ts,node_modules/**,dist/**,coverage/**,**/*.config.js,**/*.config.ts,**/*.spec.ts,**/*.test.ts,**/*.key,**/*.pem
285
+ sonar.test.exclusions=node_modules/**,dist/**,coverage/**,**/*.key,**/*.pem
286
+
287
+ # Configurações específicas para projetos SSH
288
+ sonar.javascript.environments=node
289
+ sonar.typescript.node=true
290
+ `);
291
+ //env.ts
292
+ write('src/env.ts', `import { config } from 'dotenv'
293
+
294
+ config()
295
+
296
+ const rawEnv = {
297
+ ENV: process.env.ENV,
298
+ }
299
+ export const env = rawEnv
300
+ `);
301
+ // README.md
302
+ write('README.md', `# ${projectName}
303
+
304
+ Projeto de automação de testes SSH baseado no AutoCore.
305
+
306
+ ## 🚀 Como usar
307
+
308
+ ### Pré-requisitos
309
+ 1. **Node.js**: Versão 24+ instalada
310
+ 2. **Acesso SSH**: Servidor SSH configurado
311
+ 3. **Chave privada**: Arquivo de chave privada SSH (opcional, pode usar senha)
312
+
313
+ ### Instalação de dependências
314
+ \`\`\`bash
315
+ npm install
316
+ \`\`\`
317
+
318
+ ### Configuração SSH
319
+ 1. Configure as variáveis de ambiente nos arquivos \`.env.*\`
320
+ 2. Adicione suas credenciais SSH (host, usuário, chave privada ou senha)
321
+ 3. Execute os testes
322
+
323
+ ### Executar testes
324
+ \`\`\`bash
325
+ # Ambiente preprod
326
+ npm run test:preprod
327
+
328
+ # Ambiente esteira1
329
+ npm run test:esteira1
330
+
331
+ # Ambiente esteira2
332
+ npm run test:esteira2
333
+
334
+ # Ambiente prodlike
335
+ npm run test:prodlike
336
+ \`\`\`
337
+
338
+ ### Gerar Artefato para Projetos de Cenários
339
+ npm run build
340
+
341
+ ## 📋 Estrutura do projeto
342
+
343
+ \`\`\`
344
+ ${projectName}/
345
+ ├── src/
346
+ │ └── statements/ # Lógica de operações SSH
347
+ | └── env.ts # Configuração de environment
348
+ ├── tests/ # Arquivos de teste
349
+ ├── .env.* # Variáveis de ambiente por ambiente
350
+ ├── playwright.config.ts # Configuração do Playwright
351
+ ├── tsconfig.json # Configuração TypeScript (sincronizada)
352
+ ├── biome.json # Configuração Biome (sincronizada)
353
+ └── README.md # Esta documentação
354
+ \`\`\`
355
+
356
+ ## 🔧 Desenvolvimento
357
+
358
+ - **TypeScript**: Configurado e sincronizado com AutoCore
359
+ - **Playwright**: Framework de testes
360
+ - **AutoCore**: Biblioteca de utilitários para automação SSH
361
+ - **Biome**: Linting e formatação (configuração sincronizada)
362
+ - **Ultracite**: Experiência de desenvolvimento aprimorada
363
+
364
+ ## 📊 Relatórios
365
+
366
+ Os relatórios são gerados automaticamente em:
367
+ - \`playwright-report/\` - Relatório HTML visual
368
+ - \`test-results/\` - Resultados detalhados e artifacts
369
+ - Logs estruturados no console
370
+
371
+ ## 🧪 Exemplos de Uso
372
+
373
+ ### Teste básico SSH
374
+ \`\`\`typescript
375
+ import { type TestInfo, test, TestAnnotations } from '@silasfmartins/testhub'
376
+ import { StatementsSSH } from 'projetoSSH';
377
+
378
+ test('Conexão SSH', async ({ }, testInfo) => {
379
+ TestAnnotations.SSH.testInfo = testInfo;
380
+ await TestAnnotations.setSystem('MEU_SISTEMA');
381
+ await new StatementsSSH().criarLead()
382
+ });
383
+ \`\`\`
384
+
385
+ ### Verificação de serviços
386
+ \`\`\`typescript
387
+ import { Logger, SSHActions } from '@silasfmartins/testhub'
388
+
389
+ export class ConectorSSH {
390
+ async criarLead(): Promise<void> {
391
+ Logger.info('Executando o método: criarLead')
392
+ Logger.info('Iniciando processo de criação de Lead')
393
+ const comando =
394
+ 'cmd.exe /c "cd /d C:\\Program Files (x86)\\salesforce.com\\Data Loader\\bin && dir && call InsertTesteRelease.bat && call InsertCampanhaTesteRelease.bat && call updateAdabasTesteRelease.bat"'
395
+ Logger.info('Executando comando no servidor')
396
+ await SSHActions.write(comando, 'Executando scripts de Lead no Data Loader')
397
+ const response = SSHActions.read('Resposta do comando')
398
+ Logger.info('--- Saída do comando ---')
399
+ Logger.info(response)
400
+ SSHActions.validateNotContains(
401
+ response,
402
+ 'ERROR',
403
+ 'Validando ausência de erros',
404
+ )
405
+ SSHActions.validateNotContains(
406
+ response,
407
+ 'Exception',
408
+ 'Validando ausência de exceções',
409
+ )
410
+ await SSHActions.desconectar()
411
+ Logger.info('Processo de criação de Lead finalizado com sucesso.')
412
+ Logger.info('Teste Finalizado.')
413
+ }
414
+ }
415
+ \`\`\`
416
+
417
+ ## 🔧 Comandos Úteis
418
+
419
+ \`\`\`bash
420
+ # Desenvolvimento
421
+ npm run test:preprod # Executar testes em preprod
422
+ npm run build # Compilar projeto Local (se necessário)
423
+
424
+ # Qualidade de código
425
+ npx biome check # Verificar código com Biome
426
+ npx biome format # Formatar código com Biome
427
+ npx biome check --apply # Aplicar correções automáticas
428
+
429
+ # Debug
430
+ npm run test:preprod -- --debug # Executar em modo debug
431
+ \`\`\`
432
+
433
+ ## 🔐 Configuração SSH
434
+
435
+ ### Variáveis de ambiente necessárias:
436
+ \`\`\`bash
437
+ SSH_PRIVATE_KEY_PATH=/path/to/private/key
438
+ SSH_TIMEOUT=30000
439
+ \`\`\`
440
+
441
+ ### Alternativamente com senha:
442
+ \`\`\`bash
443
+ SSH_TIMEOUT=30000
444
+ \`\`\`
445
+
446
+ ## 🔄 Sincronização com AutoCore
447
+
448
+ Este projeto mantém sincronização automática com o AutoCore para:
449
+
450
+ - **tsconfig.json**: Configuração de compilação TypeScript
451
+ - **biome.json**: Configuração de linting e formatação
452
+ - **Versões de dependências**: Sempre atualizadas
453
+
454
+ Para sincronizar manualmente:
455
+ \`\`\`bash
456
+ npm run sync
457
+ \`\`\`
458
+
459
+ ## 📈 Métricas e Monitoramento
460
+
461
+ - **Relatórios HTML**: Visualização rica dos resultados
462
+ - **Logs estruturados**: Para análise e debugging
463
+ - **Screenshots automáticos**: Em caso de falhas
464
+ - **Traces**: Para análise detalhada de execução
465
+ - **Métricas de conexão**: Tempo de resposta SSH
466
+
467
+ ## 🔒 Segurança
468
+
469
+ ### Boas práticas implementadas:
470
+ - **Variáveis de ambiente**: Credenciais não expostas no código
471
+ - **Chaves privadas**: Preferência por autenticação via chave
472
+ - **Timeouts**: Evita conexões infinitas
473
+ - **Logs seguros**: Senhas não são logadas
474
+
475
+ ### Dicas de segurança:
476
+ - Use sempre chaves SSH ao invés de senhas
477
+ - Mantenha chaves privadas com permissões restritivas (600)
478
+ - Configure fail2ban no servidor SSH
479
+ - Use portas SSH não padrão quando possível
480
+ - Mantenha logs de auditoria habilitados
481
+
482
+ ## 🆘 Resolução de Problemas
483
+
484
+ ### Erro de conexão SSH
485
+ \`\`\`bash
486
+ # Verificar conectividade
487
+ telnet $SSH_HOST $SSH_PORT
488
+
489
+ # Testar autenticação
490
+ ssh -i $SSH_PRIVATE_KEY_PATH $SSH_USER@$SSH_HOST
491
+
492
+ # Verificar permissões da chave
493
+ chmod 600 /path/to/private/key
494
+ \`\`\`
495
+
496
+ ### Problemas de autenticação
497
+ \`\`\`bash
498
+ # Verificar se chave está no servidor
499
+ ssh-copy-id -i ~/.ssh/id_rsa.pub user@servidor.com
500
+
501
+ # Verificar logs SSH no servidor
502
+ sudo tail -f /var/log/auth.log
503
+
504
+ # Testar com verbosidade
505
+ ssh -vvv -i /path/to/key user@servidor.com
506
+ \`\`\`
507
+
508
+ ### Problemas de timeout
509
+ \`\`\`bash
510
+ # Aumentar timeout no .env
511
+ SSH_TIMEOUT=60000 # 60 segundos
512
+
513
+ # Verificar latência de rede
514
+ ping $SSH_HOST
515
+ \`\`\`
516
+
517
+ ### Atualizar dependências
518
+ \`\`\`bash
519
+ npx npm-check-updates -u && npm install
520
+ \`\`\`
521
+
522
+ ## 📝 Contribuição
523
+
524
+ 1. Mantenha os padrões de código (Biome configurado)
525
+ 2. Adicione testes para novas funcionalidades SSH
526
+ 3. Use o sistema de logging do AutoCore
527
+ 4. Documente comandos e scripts adicionados
528
+ 5. Valide segurança das operações SSH
529
+
530
+ ## 📚 Referências
531
+
532
+ - [AutoCore Website](http://brtlvlty0559pl:3002/pt/login)
533
+ - [SSH Protocol Documentation](https://tools.ietf.org/html/rfc4254)
534
+ - [SSH Security Best Practices](https://stribika.github.io/2015/01/04/secure-secure-shell.html)
535
+
536
+ ---
537
+
538
+ **Gerado automaticamente pelo AutoCore v${versions?.dependencies?.['@silasfmartins/testhub'] || 'latest'}**
539
+ `);
540
+ console.log('📦 Instalando dependências...');
541
+ const installLockPath = path.join(root, '.install.lock');
542
+ if (fs.existsSync(installLockPath)) {
543
+ // Pula npm install se o lock já existe
544
+ console.log('🔄 Dependências já instaladas, pulando npm install');
545
+ }
546
+ else {
547
+ // Executa npm install e cria o lock
548
+ console.log('📦 Instalando dependências...');
549
+ try {
550
+ execSync('npm install', {
551
+ stdio: 'inherit',
552
+ cwd: root,
553
+ });
554
+ fs.writeFileSync(installLockPath, 'ok');
555
+ console.log('✅ Dependências instaladas com sucesso');
556
+ }
557
+ catch (error) {
558
+ console.warn('⚠️ Erro ao instalar dependências automaticamente');
559
+ console.log('💡 Execute manualmente: npm install');
560
+ }
561
+ }
562
+ // ✅ Estrutura de testes
563
+ console.log('📝 Criando estrutura de testes...');
564
+ // tests/example.spec.ts - Teste E2E com Playwright
565
+ write('tests/example.spec.ts', `import { type TestInfo, test } from '@playwright/test'
566
+ import { SSHClient, TestAnnotations } from '@silasfmartins/testhub'
567
+ import path from 'node:path'
568
+ import { fileURLToPath } from 'node:url'
569
+ import { StatementsConsumeVoice } from '../src/statements/StatementsSSH.js'
570
+
571
+ const __filename = fileURLToPath(import.meta.url)
572
+ const __dirname = path.dirname(__filename)
573
+
574
+ test.describe('Teste SSH via Gateway - SMP', () => {
575
+ const client = new SSHClient()
576
+
577
+ test.beforeEach(async ({}, testInfo: TestInfo) => {
578
+ TestAnnotations.SSH.testInfo = testInfo
579
+ // Use SSHActions.connectWithKey to manage connection automatically
580
+ // await SSHActions.connectWithKey(path.resolve(__dirname, '../secrets/UserSistAutBRM'))
581
+ // If you prefer low-level client, ensure SSHClient.setPrivateKeyPath exists
582
+ })
583
+
584
+ test('CT01 - Consumo de Voz VC1', async () => {
585
+ await new StatementsConsumeVoice().consumeVoiceVcOne(client)
586
+ })
587
+ })
588
+ `);
589
+ // ✅ Configurar Ultracite automaticamente
590
+ console.log('🤖 Configurando ambiente de desenvolvimento...');
591
+ await setupUltracite(root);
592
+ // ✅ Garantir sincronização final do biome.json
593
+ console.log('🔧 Sincronizando configuração do Biome...');
594
+ const finalBiomeConfig = generateBiomeConfigString();
595
+ write('biome.json', finalBiomeConfig);
596
+ // Remover o lock após tudo finalizar
597
+ if (fs.existsSync(installLockPath)) {
598
+ fs.unlinkSync(installLockPath);
599
+ console.log('🗑️ Lock de instalação removido');
600
+ }
601
+ console.log('');
602
+ console.log('🎉 Projeto SSH gerado com sucesso!');
603
+ console.log('');
604
+ console.log('📋 Próximos passos:');
605
+ console.log(' 1. Configure suas variáveis SSH nos arquivos .env.*');
606
+ console.log(' 2. Adicione host, usuário e chave privada SSH');
607
+ console.log(' 3. Execute: npm run test:preprod');
608
+ console.log(' 4. O Ultracite está configurado para VS Code');
609
+ console.log('');
610
+ console.log('🛠️ Comandos úteis:');
611
+ console.log(' npm run test:preprod - Executar testes em preprod');
612
+ console.log(' npm run test:esteira1 - Executar testes em esteira1');
613
+ console.log(' npm run test:esteira2 - Executar testes em esteira2');
614
+ console.log(' npm run test:prodlike - Executar testes em prodlike');
615
+ console.log(' npm run build - Compilar projeto');
616
+ console.log(' npm run update - Atualizar índices');
617
+ console.log(' npx biome check - Verificar código com Biome');
618
+ console.log(' npx biome format - Formatar código com Biome');
619
+ console.log('');
620
+ console.log('✅ Configurações sincronizadas com AutoCore:');
621
+ console.log(' 📝 tsconfig.json - Compilação TypeScript');
622
+ console.log(' 🎨 biome.json - Linting e formatação (SINCRONIZADO)');
623
+ console.log(' 🤖 Ultracite - Experiência de desenvolvimento');
624
+ console.log(' 📦 Dependências - Versões mais recentes');
625
+ console.log(' 🔐 SSH Client - Configuração completa para automação');
626
+ console.log('');
627
+ console.log('🚀 Projeto pronto para desenvolvimento SSH!');
628
+ console.log('');
629
+ console.log('💡 Dicas importantes:');
630
+ console.log(' • Configure chaves SSH ao invés de senhas para maior segurança');
631
+ console.log(' • Teste a conectividade SSH manualmente antes de executar testes');
632
+ console.log(' • Mantenha chaves privadas com permissões 600 (apenas owner pode ler)');
633
+ console.log(' • Use o timeout adequado para operações SSH lentas');
634
+ }
635
+ // Executar função principal
636
+ main().catch((error) => {
637
+ console.error('❌ Erro durante inicialização:', error);
638
+ process.exit(1);
639
+ });
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Versões centralizadas das dependências
3
+ * Atualizado automaticamente via npm-check-updates
4
+ */
5
+ export interface PackageVersions {
6
+ dependencies: Record<string, string>;
7
+ devDependencies: Record<string, string>;
8
+ }
9
+ /**
10
+ * Busca as versões mais atuais das dependências
11
+ */
12
+ export declare function getLatestVersions(): Promise<PackageVersions>;
13
+ /**
14
+ * ✅ NOVO - Lê o vitest.config.ts do projeto AutoCore para manter consistência
15
+ */
16
+ export declare function getAutocoreVitestConfig(): any;
17
+ /**
18
+ * ✅ NOVO - Gera vitest.config.ts para projeto consumidor
19
+ */
20
+ export declare function generateVitestConfigForProject(projectType: 'api' | 'frontend' | 'mobile' | 'ssh' | 'banco' | 'scenarios'): any;
21
+ /**
22
+ * ✅ NOVO - Gera vitest.config.ts como string TypeScript (IGUAL AO AUTOCORE)
23
+ */
24
+ export declare function generateVitestConfigString(projectType: 'api' | 'frontend' | 'mobile' | 'ssh' | 'banco' | 'scenarios'): string;
25
+ /**
26
+ * Lê o tsconfig.json do projeto AutoCore para manter consistência
27
+ */
28
+ export declare function getAutocoreTsConfig(): any;
29
+ /**
30
+ * ✅ CORRIGIDO: Função única para gerar tsconfig.json
31
+ */
32
+ export declare function generateTsConfigForProject(projectType: 'api' | 'frontend' | 'mobile' | 'ssh' | 'banco' | 'scenarios'): any;
33
+ /**
34
+ * Gera package.json com versões específicas por tipo de projeto
35
+ */
36
+ export declare function generatePackageJson(projectName: string, projectType: 'api' | 'frontend' | 'mobile' | 'ssh' | 'banco' | 'scenarios', versions: PackageVersions): any;
37
+ /**
38
+ * Tipo para configuração do Biome
39
+ */
40
+ type BiomeConfig = {
41
+ $schema?: string;
42
+ extends?: string[];
43
+ [key: string]: unknown;
44
+ };
45
+ /**
46
+ * ✅ NOVO - Gera biome.json sincronizado com o AutoCore
47
+ */
48
+ export declare function generateBiomeConfigForProject(): BiomeConfig;
49
+ /**
50
+ * ✅ ATUALIZADO - Função helper para gerar biome.json como string
51
+ */
52
+ export declare function generateBiomeConfigString(): string;
53
+ /**
54
+ * 📊 NOVO - Gera README de cobertura personalizado para o projeto
55
+ */
56
+ export declare function generateCoverageReadme(projectName: string): string;
57
+ export {};