@jterrats/smart-deployment 1.0.3

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 (395) hide show
  1. package/README.md +193 -0
  2. package/lib/ai/agentforce-error-handler.d.ts +81 -0
  3. package/lib/ai/agentforce-error-handler.js +196 -0
  4. package/lib/ai/agentforce-error-handler.js.map +1 -0
  5. package/lib/ai/agentforce-priority-service.d.ts +82 -0
  6. package/lib/ai/agentforce-priority-service.js +257 -0
  7. package/lib/ai/agentforce-priority-service.js.map +1 -0
  8. package/lib/ai/agentforce-service.d.ts +99 -0
  9. package/lib/ai/agentforce-service.js +300 -0
  10. package/lib/ai/agentforce-service.js.map +1 -0
  11. package/lib/ai/circuit-breaker.d.ts +115 -0
  12. package/lib/ai/circuit-breaker.js +277 -0
  13. package/lib/ai/circuit-breaker.js.map +1 -0
  14. package/lib/ai/dependency-inference-service.d.ts +76 -0
  15. package/lib/ai/dependency-inference-service.js +220 -0
  16. package/lib/ai/dependency-inference-service.js.map +1 -0
  17. package/lib/ai/llm-provider-factory.d.ts +15 -0
  18. package/lib/ai/llm-provider-factory.js +36 -0
  19. package/lib/ai/llm-provider-factory.js.map +1 -0
  20. package/lib/ai/llm-provider.d.ts +27 -0
  21. package/lib/ai/llm-provider.js +2 -0
  22. package/lib/ai/llm-provider.js.map +1 -0
  23. package/lib/ai/openai-service.d.ts +20 -0
  24. package/lib/ai/openai-service.js +89 -0
  25. package/lib/ai/openai-service.js.map +1 -0
  26. package/lib/ai/prompt-builder.d.ts +79 -0
  27. package/lib/ai/prompt-builder.js +180 -0
  28. package/lib/ai/prompt-builder.js.map +1 -0
  29. package/lib/ai/response-parser.d.ts +67 -0
  30. package/lib/ai/response-parser.js +234 -0
  31. package/lib/ai/response-parser.js.map +1 -0
  32. package/lib/ai/wave-validation-service.d.ts +111 -0
  33. package/lib/ai/wave-validation-service.js +381 -0
  34. package/lib/ai/wave-validation-service.js.map +1 -0
  35. package/lib/analysis/analysis-reporter.d.ts +56 -0
  36. package/lib/analysis/analysis-reporter.js +170 -0
  37. package/lib/analysis/analysis-reporter.js.map +1 -0
  38. package/lib/analytics/error-analytics.d.ts +80 -0
  39. package/lib/analytics/error-analytics.js +162 -0
  40. package/lib/analytics/error-analytics.js.map +1 -0
  41. package/lib/commands/analyze.d.ts +49 -0
  42. package/lib/commands/analyze.js +232 -0
  43. package/lib/commands/analyze.js.map +1 -0
  44. package/lib/commands/config.d.ts +42 -0
  45. package/lib/commands/config.js +219 -0
  46. package/lib/commands/config.js.map +1 -0
  47. package/lib/commands/resume.d.ts +26 -0
  48. package/lib/commands/resume.js +69 -0
  49. package/lib/commands/resume.js.map +1 -0
  50. package/lib/commands/start.d.ts +70 -0
  51. package/lib/commands/start.js +659 -0
  52. package/lib/commands/start.js.map +1 -0
  53. package/lib/commands/status.d.ts +37 -0
  54. package/lib/commands/status.js +69 -0
  55. package/lib/commands/status.js.map +1 -0
  56. package/lib/commands/validate.d.ts +33 -0
  57. package/lib/commands/validate.js +66 -0
  58. package/lib/commands/validate.js.map +1 -0
  59. package/lib/config/repo-config.d.ts +22 -0
  60. package/lib/config/repo-config.js +31 -0
  61. package/lib/config/repo-config.js.map +1 -0
  62. package/lib/constants/agentforce-limits.d.ts +174 -0
  63. package/lib/constants/agentforce-limits.js +262 -0
  64. package/lib/constants/agentforce-limits.js.map +1 -0
  65. package/lib/constants/api-version.d.ts +70 -0
  66. package/lib/constants/api-version.js +122 -0
  67. package/lib/constants/api-version.js.map +1 -0
  68. package/lib/constants/deployment-order.d.ts +68 -0
  69. package/lib/constants/deployment-order.js +162 -0
  70. package/lib/constants/deployment-order.js.map +1 -0
  71. package/lib/constants/salesforce-limits.d.ts +107 -0
  72. package/lib/constants/salesforce-limits.js +104 -0
  73. package/lib/constants/salesforce-limits.js.map +1 -0
  74. package/lib/dependencies/circular-dependency-detector.d.ts +137 -0
  75. package/lib/dependencies/circular-dependency-detector.js +329 -0
  76. package/lib/dependencies/circular-dependency-detector.js.map +1 -0
  77. package/lib/dependencies/cycle-remediation-planner.d.ts +50 -0
  78. package/lib/dependencies/cycle-remediation-planner.js +192 -0
  79. package/lib/dependencies/cycle-remediation-planner.js.map +1 -0
  80. package/lib/dependencies/dependency-cache.d.ts +134 -0
  81. package/lib/dependencies/dependency-cache.js +303 -0
  82. package/lib/dependencies/dependency-cache.js.map +1 -0
  83. package/lib/dependencies/dependency-depth-calculator.d.ts +145 -0
  84. package/lib/dependencies/dependency-depth-calculator.js +368 -0
  85. package/lib/dependencies/dependency-depth-calculator.js.map +1 -0
  86. package/lib/dependencies/dependency-graph-builder.d.ts +151 -0
  87. package/lib/dependencies/dependency-graph-builder.js +411 -0
  88. package/lib/dependencies/dependency-graph-builder.js.map +1 -0
  89. package/lib/dependencies/dependency-impact-analyzer.d.ts +145 -0
  90. package/lib/dependencies/dependency-impact-analyzer.js +330 -0
  91. package/lib/dependencies/dependency-impact-analyzer.js.map +1 -0
  92. package/lib/dependencies/dependency-merger.d.ts +122 -0
  93. package/lib/dependencies/dependency-merger.js +245 -0
  94. package/lib/dependencies/dependency-merger.js.map +1 -0
  95. package/lib/dependencies/dependency-resolver.d.ts +157 -0
  96. package/lib/dependencies/dependency-resolver.js +298 -0
  97. package/lib/dependencies/dependency-resolver.js.map +1 -0
  98. package/lib/dependencies/dependency-validator.d.ts +123 -0
  99. package/lib/dependencies/dependency-validator.js +291 -0
  100. package/lib/dependencies/dependency-validator.js.map +1 -0
  101. package/lib/dependencies/graph-visualizer.d.ts +110 -0
  102. package/lib/dependencies/graph-visualizer.js +262 -0
  103. package/lib/dependencies/graph-visualizer.js.map +1 -0
  104. package/lib/dependencies/heuristic-inference.d.ts +136 -0
  105. package/lib/dependencies/heuristic-inference.js +430 -0
  106. package/lib/dependencies/heuristic-inference.js.map +1 -0
  107. package/lib/deployment/cycle-source-editor.d.ts +34 -0
  108. package/lib/deployment/cycle-source-editor.js +121 -0
  109. package/lib/deployment/cycle-source-editor.js.map +1 -0
  110. package/lib/deployment/deployment-error-handler.d.ts +38 -0
  111. package/lib/deployment/deployment-error-handler.js +79 -0
  112. package/lib/deployment/deployment-error-handler.js.map +1 -0
  113. package/lib/deployment/deployment-reporter.d.ts +63 -0
  114. package/lib/deployment/deployment-reporter.js +150 -0
  115. package/lib/deployment/deployment-reporter.js.map +1 -0
  116. package/lib/deployment/deployment-state-summary.d.ts +38 -0
  117. package/lib/deployment/deployment-state-summary.js +209 -0
  118. package/lib/deployment/deployment-state-summary.js.map +1 -0
  119. package/lib/deployment/deployment-status-service.d.ts +36 -0
  120. package/lib/deployment/deployment-status-service.js +128 -0
  121. package/lib/deployment/deployment-status-service.js.map +1 -0
  122. package/lib/deployment/deployment-tracker.d.ts +42 -0
  123. package/lib/deployment/deployment-tracker.js +79 -0
  124. package/lib/deployment/deployment-tracker.js.map +1 -0
  125. package/lib/deployment/deployment-validation-service.d.ts +28 -0
  126. package/lib/deployment/deployment-validation-service.js +161 -0
  127. package/lib/deployment/deployment-validation-service.js.map +1 -0
  128. package/lib/deployment/retry-handler.d.ts +37 -0
  129. package/lib/deployment/retry-handler.js +86 -0
  130. package/lib/deployment/retry-handler.js.map +1 -0
  131. package/lib/deployment/sf-cli-integration.d.ts +42 -0
  132. package/lib/deployment/sf-cli-integration.js +105 -0
  133. package/lib/deployment/sf-cli-integration.js.map +1 -0
  134. package/lib/deployment/state-manager.d.ts +61 -0
  135. package/lib/deployment/state-manager.js +83 -0
  136. package/lib/deployment/state-manager.js.map +1 -0
  137. package/lib/deployment/test-executor.d.ts +41 -0
  138. package/lib/deployment/test-executor.js +87 -0
  139. package/lib/deployment/test-executor.js.map +1 -0
  140. package/lib/errors/base-error.d.ts +24 -0
  141. package/lib/errors/base-error.js +66 -0
  142. package/lib/errors/base-error.js.map +1 -0
  143. package/lib/errors/dependency-error.d.ts +37 -0
  144. package/lib/errors/dependency-error.js +76 -0
  145. package/lib/errors/dependency-error.js.map +1 -0
  146. package/lib/errors/deployment-error.d.ts +55 -0
  147. package/lib/errors/deployment-error.js +132 -0
  148. package/lib/errors/deployment-error.js.map +1 -0
  149. package/lib/errors/index.d.ts +45 -0
  150. package/lib/errors/index.js +71 -0
  151. package/lib/errors/index.js.map +1 -0
  152. package/lib/errors/network-error.d.ts +53 -0
  153. package/lib/errors/network-error.js +111 -0
  154. package/lib/errors/network-error.js.map +1 -0
  155. package/lib/errors/parsing-error.d.ts +41 -0
  156. package/lib/errors/parsing-error.js +69 -0
  157. package/lib/errors/parsing-error.js.map +1 -0
  158. package/lib/errors/validation-error-reporter.d.ts +34 -0
  159. package/lib/errors/validation-error-reporter.js +99 -0
  160. package/lib/errors/validation-error-reporter.js.map +1 -0
  161. package/lib/errors/validation-error.d.ts +58 -0
  162. package/lib/errors/validation-error.js +131 -0
  163. package/lib/errors/validation-error.js.map +1 -0
  164. package/lib/index.d.ts +2 -0
  165. package/lib/index.js +2 -0
  166. package/lib/index.js.map +1 -0
  167. package/lib/monitoring/performance-monitor.d.ts +98 -0
  168. package/lib/monitoring/performance-monitor.js +260 -0
  169. package/lib/monitoring/performance-monitor.js.map +1 -0
  170. package/lib/parsers/apex-class-parser.d.ts +47 -0
  171. package/lib/parsers/apex-class-parser.js +368 -0
  172. package/lib/parsers/apex-class-parser.js.map +1 -0
  173. package/lib/parsers/apex-trigger-parser.d.ts +48 -0
  174. package/lib/parsers/apex-trigger-parser.js +229 -0
  175. package/lib/parsers/apex-trigger-parser.js.map +1 -0
  176. package/lib/parsers/aura-parser.d.ts +55 -0
  177. package/lib/parsers/aura-parser.js +229 -0
  178. package/lib/parsers/aura-parser.js.map +1 -0
  179. package/lib/parsers/bot-parser.d.ts +65 -0
  180. package/lib/parsers/bot-parser.js +225 -0
  181. package/lib/parsers/bot-parser.js.map +1 -0
  182. package/lib/parsers/custom-metadata-parser.d.ts +94 -0
  183. package/lib/parsers/custom-metadata-parser.js +199 -0
  184. package/lib/parsers/custom-metadata-parser.js.map +1 -0
  185. package/lib/parsers/custom-object-parser.d.ts +62 -0
  186. package/lib/parsers/custom-object-parser.js +297 -0
  187. package/lib/parsers/custom-object-parser.js.map +1 -0
  188. package/lib/parsers/email-template-parser.d.ts +64 -0
  189. package/lib/parsers/email-template-parser.js +238 -0
  190. package/lib/parsers/email-template-parser.js.map +1 -0
  191. package/lib/parsers/error-resilient-parser.d.ts +110 -0
  192. package/lib/parsers/error-resilient-parser.js +277 -0
  193. package/lib/parsers/error-resilient-parser.js.map +1 -0
  194. package/lib/parsers/flexipage-parser.d.ts +64 -0
  195. package/lib/parsers/flexipage-parser.js +196 -0
  196. package/lib/parsers/flexipage-parser.js.map +1 -0
  197. package/lib/parsers/flow-parser.d.ts +54 -0
  198. package/lib/parsers/flow-parser.js +287 -0
  199. package/lib/parsers/flow-parser.js.map +1 -0
  200. package/lib/parsers/genai-prompt-parser.d.ts +67 -0
  201. package/lib/parsers/genai-prompt-parser.js +160 -0
  202. package/lib/parsers/genai-prompt-parser.js.map +1 -0
  203. package/lib/parsers/layout-parser.d.ts +64 -0
  204. package/lib/parsers/layout-parser.js +267 -0
  205. package/lib/parsers/layout-parser.js.map +1 -0
  206. package/lib/parsers/lwc-parser.d.ts +60 -0
  207. package/lib/parsers/lwc-parser.js +264 -0
  208. package/lib/parsers/lwc-parser.js.map +1 -0
  209. package/lib/parsers/permission-set-parser.d.ts +86 -0
  210. package/lib/parsers/permission-set-parser.js +152 -0
  211. package/lib/parsers/permission-set-parser.js.map +1 -0
  212. package/lib/parsers/profile-parser.d.ts +81 -0
  213. package/lib/parsers/profile-parser.js +141 -0
  214. package/lib/parsers/profile-parser.js.map +1 -0
  215. package/lib/parsers/visualforce-parser.d.ts +47 -0
  216. package/lib/parsers/visualforce-parser.js +180 -0
  217. package/lib/parsers/visualforce-parser.js.map +1 -0
  218. package/lib/provisioning/data-provisioner.d.ts +88 -0
  219. package/lib/provisioning/data-provisioner.js +257 -0
  220. package/lib/provisioning/data-provisioner.js.map +1 -0
  221. package/lib/scanner/custom-structure-scanner.d.ts +66 -0
  222. package/lib/scanner/custom-structure-scanner.js +229 -0
  223. package/lib/scanner/custom-structure-scanner.js.map +1 -0
  224. package/lib/scanner/forceignore-parser.d.ts +69 -0
  225. package/lib/scanner/forceignore-parser.js +195 -0
  226. package/lib/scanner/forceignore-parser.js.map +1 -0
  227. package/lib/scanner/metadata-format-scanner.d.ts +77 -0
  228. package/lib/scanner/metadata-format-scanner.js +282 -0
  229. package/lib/scanner/metadata-format-scanner.js.map +1 -0
  230. package/lib/scanner/monorepo-scanner.d.ts +71 -0
  231. package/lib/scanner/monorepo-scanner.js +225 -0
  232. package/lib/scanner/monorepo-scanner.js.map +1 -0
  233. package/lib/scanner/project-validator.d.ts +55 -0
  234. package/lib/scanner/project-validator.js +235 -0
  235. package/lib/scanner/project-validator.js.map +1 -0
  236. package/lib/scanner/sfdx-project-detector.d.ts +86 -0
  237. package/lib/scanner/sfdx-project-detector.js +240 -0
  238. package/lib/scanner/sfdx-project-detector.js.map +1 -0
  239. package/lib/scanner/structure-validator.d.ts +64 -0
  240. package/lib/scanner/structure-validator.js +296 -0
  241. package/lib/scanner/structure-validator.js.map +1 -0
  242. package/lib/services/metadata-scanner-service.d.ts +64 -0
  243. package/lib/services/metadata-scanner-service.js +651 -0
  244. package/lib/services/metadata-scanner-service.js.map +1 -0
  245. package/lib/types/agentforce.d.ts +157 -0
  246. package/lib/types/agentforce.js +2 -0
  247. package/lib/types/agentforce.js.map +1 -0
  248. package/lib/types/dependency.d.ts +98 -0
  249. package/lib/types/dependency.js +5 -0
  250. package/lib/types/dependency.js.map +1 -0
  251. package/lib/types/deployment-plan.d.ts +81 -0
  252. package/lib/types/deployment-plan.js +6 -0
  253. package/lib/types/deployment-plan.js.map +1 -0
  254. package/lib/types/deployment.d.ts +88 -0
  255. package/lib/types/deployment.js +5 -0
  256. package/lib/types/deployment.js.map +1 -0
  257. package/lib/types/graph.d.ts +35 -0
  258. package/lib/types/graph.js +5 -0
  259. package/lib/types/graph.js.map +1 -0
  260. package/lib/types/index.d.ts +12 -0
  261. package/lib/types/index.js +17 -0
  262. package/lib/types/index.js.map +1 -0
  263. package/lib/types/metadata.d.ts +101 -0
  264. package/lib/types/metadata.js +13 -0
  265. package/lib/types/metadata.js.map +1 -0
  266. package/lib/types/project.d.ts +156 -0
  267. package/lib/types/project.js +56 -0
  268. package/lib/types/project.js.map +1 -0
  269. package/lib/types/salesforce/apex.d.ts +94 -0
  270. package/lib/types/salesforce/apex.js +6 -0
  271. package/lib/types/salesforce/apex.js.map +1 -0
  272. package/lib/types/salesforce/aura.d.ts +150 -0
  273. package/lib/types/salesforce/aura.js +6 -0
  274. package/lib/types/salesforce/aura.js.map +1 -0
  275. package/lib/types/salesforce/bot.d.ts +293 -0
  276. package/lib/types/salesforce/bot.js +6 -0
  277. package/lib/types/salesforce/bot.js.map +1 -0
  278. package/lib/types/salesforce/common.d.ts +15 -0
  279. package/lib/types/salesforce/common.js +5 -0
  280. package/lib/types/salesforce/common.js.map +1 -0
  281. package/lib/types/salesforce/custom-metadata.d.ts +92 -0
  282. package/lib/types/salesforce/custom-metadata.js +6 -0
  283. package/lib/types/salesforce/custom-metadata.js.map +1 -0
  284. package/lib/types/salesforce/email.d.ts +56 -0
  285. package/lib/types/salesforce/email.js +6 -0
  286. package/lib/types/salesforce/email.js.map +1 -0
  287. package/lib/types/salesforce/flexipage.d.ts +149 -0
  288. package/lib/types/salesforce/flexipage.js +6 -0
  289. package/lib/types/salesforce/flexipage.js.map +1 -0
  290. package/lib/types/salesforce/flow.d.ts +516 -0
  291. package/lib/types/salesforce/flow.js +6 -0
  292. package/lib/types/salesforce/flow.js.map +1 -0
  293. package/lib/types/salesforce/genai.d.ts +67 -0
  294. package/lib/types/salesforce/genai.js +6 -0
  295. package/lib/types/salesforce/genai.js.map +1 -0
  296. package/lib/types/salesforce/index.d.ts +27 -0
  297. package/lib/types/salesforce/index.js +43 -0
  298. package/lib/types/salesforce/index.js.map +1 -0
  299. package/lib/types/salesforce/layout.d.ts +236 -0
  300. package/lib/types/salesforce/layout.js +6 -0
  301. package/lib/types/salesforce/layout.js.map +1 -0
  302. package/lib/types/salesforce/lwc.d.ts +123 -0
  303. package/lib/types/salesforce/lwc.js +6 -0
  304. package/lib/types/salesforce/lwc.js.map +1 -0
  305. package/lib/types/salesforce/object.d.ts +427 -0
  306. package/lib/types/salesforce/object.js +6 -0
  307. package/lib/types/salesforce/object.js.map +1 -0
  308. package/lib/types/salesforce/parser-types.d.ts +79 -0
  309. package/lib/types/salesforce/parser-types.js +80 -0
  310. package/lib/types/salesforce/parser-types.js.map +1 -0
  311. package/lib/types/salesforce/permission.d.ts +289 -0
  312. package/lib/types/salesforce/permission.js +6 -0
  313. package/lib/types/salesforce/permission.js.map +1 -0
  314. package/lib/types/salesforce/resource.d.ts +93 -0
  315. package/lib/types/salesforce/resource.js +6 -0
  316. package/lib/types/salesforce/resource.js.map +1 -0
  317. package/lib/types/salesforce/visualforce.d.ts +70 -0
  318. package/lib/types/salesforce/visualforce.js +6 -0
  319. package/lib/types/salesforce/visualforce.js.map +1 -0
  320. package/lib/utils/cache-manager.d.ts +158 -0
  321. package/lib/utils/cache-manager.js +429 -0
  322. package/lib/utils/cache-manager.js.map +1 -0
  323. package/lib/utils/deployment-plan-manager.d.ts +40 -0
  324. package/lib/utils/deployment-plan-manager.js +183 -0
  325. package/lib/utils/deployment-plan-manager.js.map +1 -0
  326. package/lib/utils/error-aggregator.d.ts +117 -0
  327. package/lib/utils/error-aggregator.js +268 -0
  328. package/lib/utils/error-aggregator.js.map +1 -0
  329. package/lib/utils/file-system.d.ts +62 -0
  330. package/lib/utils/file-system.js +167 -0
  331. package/lib/utils/file-system.js.map +1 -0
  332. package/lib/utils/functional.d.ts +52 -0
  333. package/lib/utils/functional.js +61 -0
  334. package/lib/utils/functional.js.map +1 -0
  335. package/lib/utils/graph-algorithms.d.ts +53 -0
  336. package/lib/utils/graph-algorithms.js +177 -0
  337. package/lib/utils/graph-algorithms.js.map +1 -0
  338. package/lib/utils/logger.d.ts +154 -0
  339. package/lib/utils/logger.js +327 -0
  340. package/lib/utils/logger.js.map +1 -0
  341. package/lib/utils/network-handler.d.ts +64 -0
  342. package/lib/utils/network-handler.js +147 -0
  343. package/lib/utils/network-handler.js.map +1 -0
  344. package/lib/utils/performance.d.ts +148 -0
  345. package/lib/utils/performance.js +294 -0
  346. package/lib/utils/performance.js.map +1 -0
  347. package/lib/utils/string.d.ts +197 -0
  348. package/lib/utils/string.js +331 -0
  349. package/lib/utils/string.js.map +1 -0
  350. package/lib/utils/xml.d.ts +97 -0
  351. package/lib/utils/xml.js +227 -0
  352. package/lib/utils/xml.js.map +1 -0
  353. package/lib/validators/xml-metadata-validator.d.ts +106 -0
  354. package/lib/validators/xml-metadata-validator.js +509 -0
  355. package/lib/validators/xml-metadata-validator.js.map +1 -0
  356. package/lib/waves/priority-wave-generator-ai.d.ts +85 -0
  357. package/lib/waves/priority-wave-generator-ai.js +191 -0
  358. package/lib/waves/priority-wave-generator-ai.js.map +1 -0
  359. package/lib/waves/priority-wave-generator.d.ts +47 -0
  360. package/lib/waves/priority-wave-generator.js +88 -0
  361. package/lib/waves/priority-wave-generator.js.map +1 -0
  362. package/lib/waves/test-optimizer.d.ts +155 -0
  363. package/lib/waves/test-optimizer.js +290 -0
  364. package/lib/waves/test-optimizer.js.map +1 -0
  365. package/lib/waves/wave-builder.d.ts +147 -0
  366. package/lib/waves/wave-builder.js +286 -0
  367. package/lib/waves/wave-builder.js.map +1 -0
  368. package/lib/waves/wave-diff-generator.d.ts +17 -0
  369. package/lib/waves/wave-diff-generator.js +6 -0
  370. package/lib/waves/wave-diff-generator.js.map +1 -0
  371. package/lib/waves/wave-executor.d.ts +33 -0
  372. package/lib/waves/wave-executor.js +50 -0
  373. package/lib/waves/wave-executor.js.map +1 -0
  374. package/lib/waves/wave-merger.d.ts +96 -0
  375. package/lib/waves/wave-merger.js +181 -0
  376. package/lib/waves/wave-merger.js.map +1 -0
  377. package/lib/waves/wave-metadata-generator.d.ts +13 -0
  378. package/lib/waves/wave-metadata-generator.js +12 -0
  379. package/lib/waves/wave-metadata-generator.js.map +1 -0
  380. package/lib/waves/wave-splitter.d.ts +154 -0
  381. package/lib/waves/wave-splitter.js +307 -0
  382. package/lib/waves/wave-splitter.js.map +1 -0
  383. package/lib/waves/wave-validator.d.ts +17 -0
  384. package/lib/waves/wave-validator.js +15 -0
  385. package/lib/waves/wave-validator.js.map +1 -0
  386. package/messages/analyze.json +18 -0
  387. package/messages/config.json +29 -0
  388. package/messages/resume.json +9 -0
  389. package/messages/start.json +24 -0
  390. package/messages/status.json +8 -0
  391. package/messages/validate.json +9 -0
  392. package/npm-shrinkwrap.json +25676 -0
  393. package/oclif.lock +11988 -0
  394. package/oclif.manifest.json +589 -0
  395. package/package.json +224 -0
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Functional Programming Utilities
3
+ */
4
+ /**
5
+ * Executes functions left-to-right
6
+ *
7
+ * @ac US-001-AC-1
8
+ */
9
+ export declare function pipe<InitialValue, FinalValue>(firstTransform: (input: InitialValue) => FinalValue | Promise<FinalValue>): (input: InitialValue) => FinalValue | Promise<FinalValue>;
10
+ export declare function pipe<InitialValue, AfterFirst, FinalValue>(firstTransform: (input: InitialValue) => AfterFirst | Promise<AfterFirst>, secondTransform: (input: AfterFirst) => FinalValue | Promise<FinalValue>): (input: InitialValue) => FinalValue | Promise<FinalValue>;
11
+ export declare function pipe<InitialValue, AfterFirst, AfterSecond, FinalValue>(firstTransform: (input: InitialValue) => AfterFirst | Promise<AfterFirst>, secondTransform: (input: AfterFirst) => AfterSecond | Promise<AfterSecond>, thirdTransform: (input: AfterSecond) => FinalValue | Promise<FinalValue>): (input: InitialValue) => FinalValue | Promise<FinalValue>;
12
+ export declare function pipe<InitialValue, AfterFirst, AfterSecond, AfterThird, FinalValue>(firstTransform: (input: InitialValue) => AfterFirst | Promise<AfterFirst>, secondTransform: (input: AfterFirst) => AfterSecond | Promise<AfterSecond>, thirdTransform: (input: AfterSecond) => AfterThird | Promise<AfterThird>, fourthTransform: (input: AfterThird) => FinalValue | Promise<FinalValue>): (input: InitialValue) => FinalValue | Promise<FinalValue>;
13
+ /**
14
+ * Executes functions right-to-left
15
+ *
16
+ * @ac US-001-AC-2
17
+ */
18
+ export declare function compose<InitialValue, FinalValue>(firstTransform: (input: InitialValue) => FinalValue | Promise<FinalValue>): (input: InitialValue) => FinalValue | Promise<FinalValue>;
19
+ export declare function compose<InitialValue, AfterFirst, FinalValue>(firstTransform: (input: AfterFirst) => FinalValue | Promise<FinalValue>, secondTransform: (input: InitialValue) => AfterFirst | Promise<AfterFirst>): (input: InitialValue) => FinalValue | Promise<FinalValue>;
20
+ export declare function compose<InitialValue, AfterFirst, AfterSecond, FinalValue>(firstTransform: (input: AfterSecond) => FinalValue | Promise<FinalValue>, secondTransform: (input: AfterFirst) => AfterSecond | Promise<AfterSecond>, thirdTransform: (input: InitialValue) => AfterFirst | Promise<AfterFirst>): (input: InitialValue) => FinalValue | Promise<FinalValue>;
21
+ export declare function compose<InitialValue, AfterFirst, AfterSecond, AfterThird, FinalValue>(firstTransform: (input: AfterThird) => FinalValue | Promise<FinalValue>, secondTransform: (input: AfterSecond) => AfterThird | Promise<AfterThird>, thirdTransform: (input: AfterFirst) => AfterSecond | Promise<AfterSecond>, fourthTransform: (input: InitialValue) => AfterFirst | Promise<AfterFirst>): (input: InitialValue) => FinalValue | Promise<FinalValue>;
22
+ /**
23
+ * Enables partial application
24
+ *
25
+ * @ac US-001-AC-3
26
+ */
27
+ export declare function curry<FirstParameter, ReturnValue>(originalFunction: (first: FirstParameter) => ReturnValue): (first: FirstParameter) => ReturnValue;
28
+ export declare function curry<FirstParameter, SecondParameter, ReturnValue>(originalFunction: (first: FirstParameter, second: SecondParameter) => ReturnValue): {
29
+ (first: FirstParameter): (second: SecondParameter) => ReturnValue;
30
+ (first: FirstParameter, second: SecondParameter): ReturnValue;
31
+ };
32
+ export declare function curry<FirstParameter, SecondParameter, ThirdParameter, ReturnValue>(originalFunction: (first: FirstParameter, second: SecondParameter, third: ThirdParameter) => ReturnValue): {
33
+ (first: FirstParameter): {
34
+ (second: SecondParameter): (third: ThirdParameter) => ReturnValue;
35
+ (second: SecondParameter, third: ThirdParameter): ReturnValue;
36
+ };
37
+ (first: FirstParameter, second: SecondParameter): (third: ThirdParameter) => ReturnValue;
38
+ (first: FirstParameter, second: SecondParameter, third: ThirdParameter): ReturnValue;
39
+ };
40
+ /**
41
+ * Memoization options
42
+ */
43
+ export type MemoizeOptions = {
44
+ maxSize?: number;
45
+ keyGenerator?: (...parameters: unknown[]) => string;
46
+ };
47
+ /**
48
+ * Caches results based on arguments
49
+ *
50
+ * @ac US-001-AC-4
51
+ */
52
+ export declare function memoize<ExpensiveFunction extends (...parameters: any[]) => any>(expensiveFunction: ExpensiveFunction, options?: MemoizeOptions): ExpensiveFunction;
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Functional Programming Utilities
3
+ */
4
+ export function pipe(...transformations) {
5
+ if (transformations.length === 0) {
6
+ return (input) => input;
7
+ }
8
+ return (initialValue) => {
9
+ let currentValue = initialValue;
10
+ for (const transform of transformations) {
11
+ if (currentValue instanceof Promise) {
12
+ currentValue = currentValue.then(transform);
13
+ }
14
+ else {
15
+ currentValue = transform(currentValue);
16
+ }
17
+ }
18
+ return currentValue;
19
+ };
20
+ }
21
+ export function compose(...transformations) {
22
+ return pipe(...transformations.reverse());
23
+ }
24
+ /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-argument */
25
+ export function curry(originalFunction) {
26
+ return function curriedFunction(...providedParameters) {
27
+ if (providedParameters.length >= originalFunction.length) {
28
+ return originalFunction(...providedParameters);
29
+ }
30
+ return (...remainingParameters) => curriedFunction(...providedParameters, ...remainingParameters);
31
+ };
32
+ }
33
+ /**
34
+ * Caches results based on arguments
35
+ *
36
+ * @ac US-001-AC-4
37
+ */
38
+ /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-assignment */
39
+ export function memoize(expensiveFunction, options = {}) {
40
+ const { maxSize = Infinity, keyGenerator = JSON.stringify } = options;
41
+ const cachedResults = new Map();
42
+ const accessOrder = [];
43
+ return ((...parameters) => {
44
+ const cacheKey = keyGenerator(...parameters);
45
+ if (cachedResults.has(cacheKey)) {
46
+ return cachedResults.get(cacheKey);
47
+ }
48
+ const computedValue = expensiveFunction(...parameters);
49
+ if (cachedResults.size >= maxSize) {
50
+ const oldestKey = accessOrder.shift();
51
+ if (oldestKey !== undefined) {
52
+ cachedResults.delete(oldestKey);
53
+ }
54
+ }
55
+ cachedResults.set(cacheKey, computedValue);
56
+ accessOrder.push(cacheKey);
57
+ return computedValue;
58
+ });
59
+ }
60
+ /* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-assignment */
61
+ //# sourceMappingURL=functional.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"functional.js","sourceRoot":"","sources":["../../src/utils/functional.ts"],"names":[],"mappings":"AAAA;;GAEG;AAyBH,MAAM,UAAU,IAAI,CAAC,GAAG,eAAmD;IACzE,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACjC,OAAO,CAAC,KAAc,EAAE,EAAE,CAAC,KAAK,CAAC;IACnC,CAAC;IAED,OAAO,CAAC,YAAqB,EAAE,EAAE;QAC/B,IAAI,YAAY,GAAY,YAAY,CAAC;QAEzC,KAAK,MAAM,SAAS,IAAI,eAAe,EAAE,CAAC;YACxC,IAAI,YAAY,YAAY,OAAO,EAAE,CAAC;gBACpC,YAAY,GAAG,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YAC9C,CAAC;iBAAM,CAAC;gBACN,YAAY,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC;YACzC,CAAC;QACH,CAAC;QAED,OAAO,YAAY,CAAC;IACtB,CAAC,CAAC;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AAE,CAAC;gBAC5B,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YAClC,CAAC;QACH,CAAC;QAED,aAAa,CAAC,GAAG,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;QAC3C,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAE3B,OAAO,aAAa,CAAC;IACvB,CAAC,CAAsB,CAAC;AAC1B,CAAC;AACD,2KAA2K"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Graph Algorithms for Dependency Analysis
3
+ *
4
+ * Provides efficient algorithms for analyzing metadata dependency graphs:
5
+ * - Topological sorting for deployment ordering
6
+ * - Cycle detection for identifying circular dependencies
7
+ * - Depth calculation for determining deployment waves
8
+ * - Path finding for dependency tracing
9
+ */
10
+ export type NodeId = string;
11
+ export type GraphNode = {
12
+ nodeId: NodeId;
13
+ dependencies: Set<NodeId>;
14
+ };
15
+ export type DependencyGraph = Map<NodeId, GraphNode>;
16
+ export type CycleDetectionResult = {
17
+ hasCycles: boolean;
18
+ cycles: NodeId[][];
19
+ };
20
+ /**
21
+ * Performs topological sort using Kahn's algorithm (BFS-based)
22
+ *
23
+ * @ac US-002-AC-1
24
+ * @param dependencyGraph - Graph where edges represent dependencies
25
+ * @returns Array of node IDs in topological order (dependencies first)
26
+ */
27
+ export declare function topologicalSort(dependencyGraph: DependencyGraph): NodeId[];
28
+ /**
29
+ * Detects cycles using Depth-First Search with color marking
30
+ *
31
+ * @ac US-002-AC-2
32
+ * @param dependencyGraph - Graph to analyze for cycles
33
+ * @returns Detection result with all found cycles
34
+ */
35
+ export declare function detectCycles(dependencyGraph: DependencyGraph): CycleDetectionResult;
36
+ /**
37
+ * Calculates dependency depth (longest path from root)
38
+ *
39
+ * @ac US-002-AC-3
40
+ * @param dependencyGraph - Graph to analyze
41
+ * @returns Map of node ID to its depth level
42
+ */
43
+ export declare function calculateDepth(dependencyGraph: DependencyGraph): Map<NodeId, number>;
44
+ /**
45
+ * Finds shortest path between two nodes using BFS
46
+ *
47
+ * @ac US-002-AC-4
48
+ * @param dependencyGraph - Graph to search
49
+ * @param startNodeId - Starting node
50
+ * @param targetNodeId - Target node to find
51
+ * @returns Array representing path from start to target, or null if no path exists
52
+ */
53
+ export declare function findPath(dependencyGraph: DependencyGraph, startNodeId: NodeId, targetNodeId: NodeId): NodeId[] | null;
@@ -0,0 +1,177 @@
1
+ /**
2
+ * Graph Algorithms for Dependency Analysis
3
+ *
4
+ * Provides efficient algorithms for analyzing metadata dependency graphs:
5
+ * - Topological sorting for deployment ordering
6
+ * - Cycle detection for identifying circular dependencies
7
+ * - Depth calculation for determining deployment waves
8
+ * - Path finding for dependency tracing
9
+ */
10
+ /**
11
+ * Performs topological sort using Kahn's algorithm (BFS-based)
12
+ *
13
+ * @ac US-002-AC-1
14
+ * @param dependencyGraph - Graph where edges represent dependencies
15
+ * @returns Array of node IDs in topological order (dependencies first)
16
+ */
17
+ export function topologicalSort(dependencyGraph) {
18
+ const sortedNodes = [];
19
+ const remainingDependencies = new Map();
20
+ const readyQueue = [];
21
+ // Initialize: copy all dependencies
22
+ for (const [nodeId, graphNode] of dependencyGraph) {
23
+ remainingDependencies.set(nodeId, new Set(graphNode.dependencies));
24
+ }
25
+ // Find all nodes with no dependencies (ready to process)
26
+ for (const [nodeId, dependencies] of remainingDependencies) {
27
+ if (dependencies.size === 0) {
28
+ readyQueue.push(nodeId);
29
+ }
30
+ }
31
+ // Process nodes in topological order
32
+ while (readyQueue.length > 0) {
33
+ const currentNodeId = readyQueue.shift();
34
+ sortedNodes.push(currentNodeId);
35
+ // Remove this node from all other nodes' dependencies
36
+ for (const [nodeId, dependencies] of remainingDependencies) {
37
+ if (dependencies.has(currentNodeId)) {
38
+ dependencies.delete(currentNodeId);
39
+ // If node now has no dependencies, add to ready queue
40
+ if (dependencies.size === 0 && !sortedNodes.includes(nodeId)) {
41
+ readyQueue.push(nodeId);
42
+ }
43
+ }
44
+ }
45
+ }
46
+ return sortedNodes;
47
+ }
48
+ /**
49
+ * Detects cycles using Depth-First Search with color marking
50
+ *
51
+ * @ac US-002-AC-2
52
+ * @param dependencyGraph - Graph to analyze for cycles
53
+ * @returns Detection result with all found cycles
54
+ */
55
+ export function detectCycles(dependencyGraph) {
56
+ const visitedNodes = new Set();
57
+ const recursionStack = new Set();
58
+ const discoveredCycles = [];
59
+ const pathToNode = [];
60
+ function depthFirstSearch(currentNodeId) {
61
+ visitedNodes.add(currentNodeId);
62
+ recursionStack.add(currentNodeId);
63
+ pathToNode.push(currentNodeId);
64
+ const currentNode = dependencyGraph.get(currentNodeId);
65
+ if (currentNode) {
66
+ for (const dependencyId of currentNode.dependencies) {
67
+ if (!visitedNodes.has(dependencyId)) {
68
+ if (depthFirstSearch(dependencyId)) {
69
+ return true; // Cycle found in subtree
70
+ }
71
+ }
72
+ else if (recursionStack.has(dependencyId)) {
73
+ // Found a cycle!
74
+ const cycleStartIndex = pathToNode.indexOf(dependencyId);
75
+ const cycleNodes = pathToNode.slice(cycleStartIndex);
76
+ discoveredCycles.push(cycleNodes);
77
+ return true;
78
+ }
79
+ }
80
+ }
81
+ recursionStack.delete(currentNodeId);
82
+ pathToNode.pop();
83
+ return false;
84
+ }
85
+ for (const [nodeId] of dependencyGraph) {
86
+ if (!visitedNodes.has(nodeId)) {
87
+ depthFirstSearch(nodeId);
88
+ pathToNode.length = 0; // Clear path for next component
89
+ }
90
+ }
91
+ return {
92
+ hasCycles: discoveredCycles.length > 0,
93
+ cycles: discoveredCycles,
94
+ };
95
+ }
96
+ /**
97
+ * Calculates dependency depth (longest path from root)
98
+ *
99
+ * @ac US-002-AC-3
100
+ * @param dependencyGraph - Graph to analyze
101
+ * @returns Map of node ID to its depth level
102
+ */
103
+ export function calculateDepth(dependencyGraph) {
104
+ const depthMap = new Map();
105
+ const visitedNodes = new Set();
106
+ function calculateNodeDepth(nodeId) {
107
+ if (depthMap.has(nodeId)) {
108
+ return depthMap.get(nodeId);
109
+ }
110
+ if (visitedNodes.has(nodeId)) {
111
+ // Circular dependency, return large number
112
+ return Infinity;
113
+ }
114
+ visitedNodes.add(nodeId);
115
+ const currentNode = dependencyGraph.get(nodeId);
116
+ if (!currentNode || currentNode.dependencies.size === 0) {
117
+ depthMap.set(nodeId, 0);
118
+ visitedNodes.delete(nodeId);
119
+ return 0;
120
+ }
121
+ let maximumDepth = 0;
122
+ for (const dependencyId of currentNode.dependencies) {
123
+ const dependencyDepth = calculateNodeDepth(dependencyId);
124
+ maximumDepth = Math.max(maximumDepth, dependencyDepth + 1);
125
+ }
126
+ depthMap.set(nodeId, maximumDepth);
127
+ visitedNodes.delete(nodeId);
128
+ return maximumDepth;
129
+ }
130
+ for (const [nodeId] of dependencyGraph) {
131
+ if (!depthMap.has(nodeId)) {
132
+ calculateNodeDepth(nodeId);
133
+ }
134
+ }
135
+ return depthMap;
136
+ }
137
+ /**
138
+ * Finds shortest path between two nodes using BFS
139
+ *
140
+ * @ac US-002-AC-4
141
+ * @param dependencyGraph - Graph to search
142
+ * @param startNodeId - Starting node
143
+ * @param targetNodeId - Target node to find
144
+ * @returns Array representing path from start to target, or null if no path exists
145
+ */
146
+ export function findPath(dependencyGraph, startNodeId, targetNodeId) {
147
+ if (startNodeId === targetNodeId) {
148
+ return [startNodeId];
149
+ }
150
+ const visitedNodes = new Set();
151
+ const searchQueue = [
152
+ { currentNodeId: startNodeId, pathSoFar: [startNodeId] },
153
+ ];
154
+ while (searchQueue.length > 0) {
155
+ const { currentNodeId, pathSoFar } = searchQueue.shift();
156
+ if (visitedNodes.has(currentNodeId)) {
157
+ continue;
158
+ }
159
+ visitedNodes.add(currentNodeId);
160
+ const currentNode = dependencyGraph.get(currentNodeId);
161
+ if (!currentNode)
162
+ continue;
163
+ for (const dependencyId of currentNode.dependencies) {
164
+ if (dependencyId === targetNodeId) {
165
+ return [...pathSoFar, dependencyId];
166
+ }
167
+ if (!visitedNodes.has(dependencyId)) {
168
+ searchQueue.push({
169
+ currentNodeId: dependencyId,
170
+ pathSoFar: [...pathSoFar, dependencyId],
171
+ });
172
+ }
173
+ }
174
+ }
175
+ return null;
176
+ }
177
+ //# sourceMappingURL=graph-algorithms.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph-algorithms.js","sourceRoot":"","sources":["../../src/utils/graph-algorithms.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAgBH;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,eAAgC;IAC9D,MAAM,WAAW,GAAa,EAAE,CAAC;IACjC,MAAM,qBAAqB,GAAG,IAAI,GAAG,EAAuB,CAAC;IAC7D,MAAM,UAAU,GAAa,EAAE,CAAC;IAEhC,oCAAoC;IACpC,KAAK,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI,eAAe,EAAE,CAAC;QAClD,qBAAqB,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,GAAG,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;IACrE,CAAC;IAED,yDAAyD;IACzD,KAAK,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,IAAI,qBAAqB,EAAE,CAAC;QAC3D,IAAI,YAAY,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;YAC5B,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;IAED,qCAAqC;IACrC,OAAO,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC7B,MAAM,aAAa,GAAG,UAAU,CAAC,KAAK,EAAG,CAAC;QAC1C,WAAW,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAEhC,sDAAsD;QACtD,KAAK,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,IAAI,qBAAqB,EAAE,CAAC;YAC3D,IAAI,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;gBACpC,YAAY,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;gBAEnC,sDAAsD;gBACtD,IAAI,YAAY,CAAC,IAAI,KAAK,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,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAEhC,MAAM,WAAW,GAAG,eAAe,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACvD,IAAI,CAAC,WAAW;YAAE,SAAS;QAE3B,KAAK,MAAM,YAAY,IAAI,WAAW,CAAC,YAAY,EAAE,CAAC;YACpD,IAAI,YAAY,KAAK,YAAY,EAAE,CAAC;gBAClC,OAAO,CAAC,GAAG,SAAS,EAAE,YAAY,CAAC,CAAC;YACtC,CAAC;YAED,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;gBACpC,WAAW,CAAC,IAAI,CAAC;oBACf,aAAa,EAAE,YAAY;oBAC3B,SAAS,EAAE,CAAC,GAAG,SAAS,EAAE,YAAY,CAAC;iBACxC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,154 @@
1
+ /**
2
+ * Log levels in order of severity
3
+ */
4
+ export declare enum LogLevel {
5
+ DEBUG = "DEBUG",
6
+ INFO = "INFO",
7
+ WARN = "WARN",
8
+ ERROR = "ERROR"
9
+ }
10
+ /**
11
+ * Log entry structure
12
+ */
13
+ export type LogEntry = {
14
+ timestamp: string;
15
+ level: LogLevel;
16
+ component: string;
17
+ message: string;
18
+ context?: Record<string, unknown>;
19
+ duration?: number;
20
+ error?: {
21
+ name: string;
22
+ message: string;
23
+ stack?: string;
24
+ };
25
+ };
26
+ /**
27
+ * Logger configuration
28
+ */
29
+ export type LoggerConfig = {
30
+ /** Component name for context */
31
+ component: string;
32
+ /** Minimum log level to record */
33
+ level: LogLevel;
34
+ /** Enable console output */
35
+ logToConsole: boolean;
36
+ /** Enable file output */
37
+ logToFile: boolean;
38
+ /** Directory for log files */
39
+ logDirectory?: string;
40
+ /** Format: 'json' or 'text' */
41
+ format: 'json' | 'text';
42
+ /** Max log file size in MB before rotation */
43
+ maxLogFileSizeMB: number;
44
+ /** Max number of rotated log files to keep */
45
+ maxLogFiles: number;
46
+ };
47
+ /**
48
+ * Performance timer for measuring operation duration
49
+ */
50
+ export declare class PerformanceTimer {
51
+ private startTime;
52
+ private label;
53
+ constructor(label: string);
54
+ end(): number;
55
+ getLabel(): string;
56
+ }
57
+ /**
58
+ * Singleton Logger with file rotation and structured logging
59
+ *
60
+ * @example
61
+ * ```typescript
62
+ * const logger = Logger.getInstance({ component: 'MyComponent' });
63
+ * logger.info('Operation started', { userId: 123 });
64
+ * logger.error('Operation failed', { error, userId: 123 });
65
+ *
66
+ * const timer = logger.startTimer('expensive-operation');
67
+ * // ... do work ...
68
+ * logger.info('Operation completed', { duration: timer.end() });
69
+ * ```
70
+ */
71
+ export declare class Logger {
72
+ private static instances;
73
+ private config;
74
+ private logFilePath?;
75
+ private writeQueue;
76
+ /**
77
+ * Private constructor - use getInstance() instead
78
+ */
79
+ private constructor();
80
+ /**
81
+ * Get logger instance for component (one instance per component)
82
+ */
83
+ static getInstance(config: Partial<LoggerConfig> & {
84
+ component: string;
85
+ }): Logger;
86
+ /**
87
+ * Reset all instances (for testing)
88
+ */
89
+ static resetInstances(): void;
90
+ /**
91
+ * Log debug message
92
+ */
93
+ debug(message: string, context?: Record<string, unknown>): void;
94
+ /**
95
+ * Log info message
96
+ */
97
+ info(message: string, context?: Record<string, unknown>): void;
98
+ /**
99
+ * Log warning message
100
+ */
101
+ warn(message: string, context?: Record<string, unknown>): void;
102
+ /**
103
+ * Log error message
104
+ */
105
+ error(message: string, context?: Record<string, unknown>): void;
106
+ /**
107
+ * Log with timer duration
108
+ */
109
+ logWithDuration(level: LogLevel, message: string, timer: PerformanceTimer, context?: Record<string, unknown>): void;
110
+ /**
111
+ * Update logger configuration
112
+ */
113
+ configure(config: Partial<Omit<LoggerConfig, 'component'>>): void;
114
+ /**
115
+ * Get current configuration
116
+ */
117
+ getConfig(): Readonly<LoggerConfig>;
118
+ /**
119
+ * Flush any pending writes (useful for testing)
120
+ */
121
+ flush(): Promise<void>;
122
+ /**
123
+ * Core logging method
124
+ */
125
+ private log;
126
+ /**
127
+ * Log to console with color coding
128
+ */
129
+ private logToConsoleOutput;
130
+ /**
131
+ * Log to file asynchronously (queued to prevent race conditions)
132
+ */
133
+ private logToFileAsync;
134
+ /**
135
+ * Check file size and rotate if needed
136
+ */
137
+ private rotateIfNeeded;
138
+ /**
139
+ * Rotate log file
140
+ */
141
+ private rotateLogFile;
142
+ /**
143
+ * Format log entry based on configured format
144
+ */
145
+ private formatEntry;
146
+ }
147
+ /**
148
+ * Get or create logger instance
149
+ */
150
+ export declare function getLogger(component: string, config?: Partial<Omit<LoggerConfig, 'component'>>): Logger;
151
+ /**
152
+ * Create a performance timer for measuring operation duration
153
+ */
154
+ export declare function startTimer(label: string): PerformanceTimer;