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