@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.
- package/README.md +193 -0
- package/lib/ai/agentforce-error-handler.d.ts +81 -0
- package/lib/ai/agentforce-error-handler.js +196 -0
- package/lib/ai/agentforce-error-handler.js.map +1 -0
- package/lib/ai/agentforce-priority-service.d.ts +82 -0
- package/lib/ai/agentforce-priority-service.js +257 -0
- package/lib/ai/agentforce-priority-service.js.map +1 -0
- package/lib/ai/agentforce-service.d.ts +99 -0
- package/lib/ai/agentforce-service.js +300 -0
- package/lib/ai/agentforce-service.js.map +1 -0
- package/lib/ai/circuit-breaker.d.ts +115 -0
- package/lib/ai/circuit-breaker.js +277 -0
- package/lib/ai/circuit-breaker.js.map +1 -0
- package/lib/ai/dependency-inference-service.d.ts +76 -0
- package/lib/ai/dependency-inference-service.js +220 -0
- package/lib/ai/dependency-inference-service.js.map +1 -0
- package/lib/ai/llm-provider-factory.d.ts +15 -0
- package/lib/ai/llm-provider-factory.js +36 -0
- package/lib/ai/llm-provider-factory.js.map +1 -0
- package/lib/ai/llm-provider.d.ts +27 -0
- package/lib/ai/llm-provider.js +2 -0
- package/lib/ai/llm-provider.js.map +1 -0
- package/lib/ai/openai-service.d.ts +20 -0
- package/lib/ai/openai-service.js +89 -0
- package/lib/ai/openai-service.js.map +1 -0
- package/lib/ai/prompt-builder.d.ts +79 -0
- package/lib/ai/prompt-builder.js +180 -0
- package/lib/ai/prompt-builder.js.map +1 -0
- package/lib/ai/response-parser.d.ts +67 -0
- package/lib/ai/response-parser.js +234 -0
- package/lib/ai/response-parser.js.map +1 -0
- package/lib/ai/wave-validation-service.d.ts +111 -0
- package/lib/ai/wave-validation-service.js +381 -0
- package/lib/ai/wave-validation-service.js.map +1 -0
- package/lib/analysis/analysis-reporter.d.ts +56 -0
- package/lib/analysis/analysis-reporter.js +170 -0
- package/lib/analysis/analysis-reporter.js.map +1 -0
- package/lib/analytics/error-analytics.d.ts +80 -0
- package/lib/analytics/error-analytics.js +162 -0
- package/lib/analytics/error-analytics.js.map +1 -0
- package/lib/commands/analyze.d.ts +49 -0
- package/lib/commands/analyze.js +232 -0
- package/lib/commands/analyze.js.map +1 -0
- package/lib/commands/config.d.ts +42 -0
- package/lib/commands/config.js +219 -0
- package/lib/commands/config.js.map +1 -0
- package/lib/commands/resume.d.ts +26 -0
- package/lib/commands/resume.js +69 -0
- package/lib/commands/resume.js.map +1 -0
- package/lib/commands/start.d.ts +70 -0
- package/lib/commands/start.js +659 -0
- package/lib/commands/start.js.map +1 -0
- package/lib/commands/status.d.ts +37 -0
- package/lib/commands/status.js +69 -0
- package/lib/commands/status.js.map +1 -0
- package/lib/commands/validate.d.ts +33 -0
- package/lib/commands/validate.js +66 -0
- package/lib/commands/validate.js.map +1 -0
- package/lib/config/repo-config.d.ts +22 -0
- package/lib/config/repo-config.js +31 -0
- package/lib/config/repo-config.js.map +1 -0
- package/lib/constants/agentforce-limits.d.ts +174 -0
- package/lib/constants/agentforce-limits.js +262 -0
- package/lib/constants/agentforce-limits.js.map +1 -0
- package/lib/constants/api-version.d.ts +70 -0
- package/lib/constants/api-version.js +122 -0
- package/lib/constants/api-version.js.map +1 -0
- package/lib/constants/deployment-order.d.ts +68 -0
- package/lib/constants/deployment-order.js +162 -0
- package/lib/constants/deployment-order.js.map +1 -0
- package/lib/constants/salesforce-limits.d.ts +107 -0
- package/lib/constants/salesforce-limits.js +104 -0
- package/lib/constants/salesforce-limits.js.map +1 -0
- package/lib/dependencies/circular-dependency-detector.d.ts +137 -0
- package/lib/dependencies/circular-dependency-detector.js +329 -0
- package/lib/dependencies/circular-dependency-detector.js.map +1 -0
- package/lib/dependencies/cycle-remediation-planner.d.ts +50 -0
- package/lib/dependencies/cycle-remediation-planner.js +192 -0
- package/lib/dependencies/cycle-remediation-planner.js.map +1 -0
- package/lib/dependencies/dependency-cache.d.ts +134 -0
- package/lib/dependencies/dependency-cache.js +303 -0
- package/lib/dependencies/dependency-cache.js.map +1 -0
- package/lib/dependencies/dependency-depth-calculator.d.ts +145 -0
- package/lib/dependencies/dependency-depth-calculator.js +368 -0
- package/lib/dependencies/dependency-depth-calculator.js.map +1 -0
- package/lib/dependencies/dependency-graph-builder.d.ts +151 -0
- package/lib/dependencies/dependency-graph-builder.js +411 -0
- package/lib/dependencies/dependency-graph-builder.js.map +1 -0
- package/lib/dependencies/dependency-impact-analyzer.d.ts +145 -0
- package/lib/dependencies/dependency-impact-analyzer.js +330 -0
- package/lib/dependencies/dependency-impact-analyzer.js.map +1 -0
- package/lib/dependencies/dependency-merger.d.ts +122 -0
- package/lib/dependencies/dependency-merger.js +245 -0
- package/lib/dependencies/dependency-merger.js.map +1 -0
- package/lib/dependencies/dependency-resolver.d.ts +157 -0
- package/lib/dependencies/dependency-resolver.js +298 -0
- package/lib/dependencies/dependency-resolver.js.map +1 -0
- package/lib/dependencies/dependency-validator.d.ts +123 -0
- package/lib/dependencies/dependency-validator.js +291 -0
- package/lib/dependencies/dependency-validator.js.map +1 -0
- package/lib/dependencies/graph-visualizer.d.ts +110 -0
- package/lib/dependencies/graph-visualizer.js +262 -0
- package/lib/dependencies/graph-visualizer.js.map +1 -0
- package/lib/dependencies/heuristic-inference.d.ts +136 -0
- package/lib/dependencies/heuristic-inference.js +430 -0
- package/lib/dependencies/heuristic-inference.js.map +1 -0
- package/lib/deployment/cycle-source-editor.d.ts +34 -0
- package/lib/deployment/cycle-source-editor.js +121 -0
- package/lib/deployment/cycle-source-editor.js.map +1 -0
- package/lib/deployment/deployment-error-handler.d.ts +38 -0
- package/lib/deployment/deployment-error-handler.js +79 -0
- package/lib/deployment/deployment-error-handler.js.map +1 -0
- package/lib/deployment/deployment-reporter.d.ts +63 -0
- package/lib/deployment/deployment-reporter.js +150 -0
- package/lib/deployment/deployment-reporter.js.map +1 -0
- package/lib/deployment/deployment-state-summary.d.ts +38 -0
- package/lib/deployment/deployment-state-summary.js +209 -0
- package/lib/deployment/deployment-state-summary.js.map +1 -0
- package/lib/deployment/deployment-status-service.d.ts +36 -0
- package/lib/deployment/deployment-status-service.js +128 -0
- package/lib/deployment/deployment-status-service.js.map +1 -0
- package/lib/deployment/deployment-tracker.d.ts +42 -0
- package/lib/deployment/deployment-tracker.js +79 -0
- package/lib/deployment/deployment-tracker.js.map +1 -0
- package/lib/deployment/deployment-validation-service.d.ts +28 -0
- package/lib/deployment/deployment-validation-service.js +161 -0
- package/lib/deployment/deployment-validation-service.js.map +1 -0
- package/lib/deployment/retry-handler.d.ts +37 -0
- package/lib/deployment/retry-handler.js +86 -0
- package/lib/deployment/retry-handler.js.map +1 -0
- package/lib/deployment/sf-cli-integration.d.ts +42 -0
- package/lib/deployment/sf-cli-integration.js +105 -0
- package/lib/deployment/sf-cli-integration.js.map +1 -0
- package/lib/deployment/state-manager.d.ts +61 -0
- package/lib/deployment/state-manager.js +83 -0
- package/lib/deployment/state-manager.js.map +1 -0
- package/lib/deployment/test-executor.d.ts +41 -0
- package/lib/deployment/test-executor.js +87 -0
- package/lib/deployment/test-executor.js.map +1 -0
- package/lib/errors/base-error.d.ts +24 -0
- package/lib/errors/base-error.js +66 -0
- package/lib/errors/base-error.js.map +1 -0
- package/lib/errors/dependency-error.d.ts +37 -0
- package/lib/errors/dependency-error.js +76 -0
- package/lib/errors/dependency-error.js.map +1 -0
- package/lib/errors/deployment-error.d.ts +55 -0
- package/lib/errors/deployment-error.js +132 -0
- package/lib/errors/deployment-error.js.map +1 -0
- package/lib/errors/index.d.ts +45 -0
- package/lib/errors/index.js +71 -0
- package/lib/errors/index.js.map +1 -0
- package/lib/errors/network-error.d.ts +53 -0
- package/lib/errors/network-error.js +111 -0
- package/lib/errors/network-error.js.map +1 -0
- package/lib/errors/parsing-error.d.ts +41 -0
- package/lib/errors/parsing-error.js +69 -0
- package/lib/errors/parsing-error.js.map +1 -0
- package/lib/errors/validation-error-reporter.d.ts +34 -0
- package/lib/errors/validation-error-reporter.js +99 -0
- package/lib/errors/validation-error-reporter.js.map +1 -0
- package/lib/errors/validation-error.d.ts +58 -0
- package/lib/errors/validation-error.js +131 -0
- package/lib/errors/validation-error.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/lib/monitoring/performance-monitor.d.ts +98 -0
- package/lib/monitoring/performance-monitor.js +260 -0
- package/lib/monitoring/performance-monitor.js.map +1 -0
- package/lib/parsers/apex-class-parser.d.ts +47 -0
- package/lib/parsers/apex-class-parser.js +368 -0
- package/lib/parsers/apex-class-parser.js.map +1 -0
- package/lib/parsers/apex-trigger-parser.d.ts +48 -0
- package/lib/parsers/apex-trigger-parser.js +229 -0
- package/lib/parsers/apex-trigger-parser.js.map +1 -0
- package/lib/parsers/aura-parser.d.ts +55 -0
- package/lib/parsers/aura-parser.js +229 -0
- package/lib/parsers/aura-parser.js.map +1 -0
- package/lib/parsers/bot-parser.d.ts +65 -0
- package/lib/parsers/bot-parser.js +225 -0
- package/lib/parsers/bot-parser.js.map +1 -0
- package/lib/parsers/custom-metadata-parser.d.ts +94 -0
- package/lib/parsers/custom-metadata-parser.js +199 -0
- package/lib/parsers/custom-metadata-parser.js.map +1 -0
- package/lib/parsers/custom-object-parser.d.ts +62 -0
- package/lib/parsers/custom-object-parser.js +297 -0
- package/lib/parsers/custom-object-parser.js.map +1 -0
- package/lib/parsers/email-template-parser.d.ts +64 -0
- package/lib/parsers/email-template-parser.js +238 -0
- package/lib/parsers/email-template-parser.js.map +1 -0
- package/lib/parsers/error-resilient-parser.d.ts +110 -0
- package/lib/parsers/error-resilient-parser.js +277 -0
- package/lib/parsers/error-resilient-parser.js.map +1 -0
- package/lib/parsers/flexipage-parser.d.ts +64 -0
- package/lib/parsers/flexipage-parser.js +196 -0
- package/lib/parsers/flexipage-parser.js.map +1 -0
- package/lib/parsers/flow-parser.d.ts +54 -0
- package/lib/parsers/flow-parser.js +287 -0
- package/lib/parsers/flow-parser.js.map +1 -0
- package/lib/parsers/genai-prompt-parser.d.ts +67 -0
- package/lib/parsers/genai-prompt-parser.js +160 -0
- package/lib/parsers/genai-prompt-parser.js.map +1 -0
- package/lib/parsers/layout-parser.d.ts +64 -0
- package/lib/parsers/layout-parser.js +267 -0
- package/lib/parsers/layout-parser.js.map +1 -0
- package/lib/parsers/lwc-parser.d.ts +60 -0
- package/lib/parsers/lwc-parser.js +264 -0
- package/lib/parsers/lwc-parser.js.map +1 -0
- package/lib/parsers/permission-set-parser.d.ts +86 -0
- package/lib/parsers/permission-set-parser.js +152 -0
- package/lib/parsers/permission-set-parser.js.map +1 -0
- package/lib/parsers/profile-parser.d.ts +81 -0
- package/lib/parsers/profile-parser.js +141 -0
- package/lib/parsers/profile-parser.js.map +1 -0
- package/lib/parsers/visualforce-parser.d.ts +47 -0
- package/lib/parsers/visualforce-parser.js +180 -0
- package/lib/parsers/visualforce-parser.js.map +1 -0
- package/lib/provisioning/data-provisioner.d.ts +88 -0
- package/lib/provisioning/data-provisioner.js +257 -0
- package/lib/provisioning/data-provisioner.js.map +1 -0
- package/lib/scanner/custom-structure-scanner.d.ts +66 -0
- package/lib/scanner/custom-structure-scanner.js +229 -0
- package/lib/scanner/custom-structure-scanner.js.map +1 -0
- package/lib/scanner/forceignore-parser.d.ts +69 -0
- package/lib/scanner/forceignore-parser.js +195 -0
- package/lib/scanner/forceignore-parser.js.map +1 -0
- package/lib/scanner/metadata-format-scanner.d.ts +77 -0
- package/lib/scanner/metadata-format-scanner.js +282 -0
- package/lib/scanner/metadata-format-scanner.js.map +1 -0
- package/lib/scanner/monorepo-scanner.d.ts +71 -0
- package/lib/scanner/monorepo-scanner.js +225 -0
- package/lib/scanner/monorepo-scanner.js.map +1 -0
- package/lib/scanner/project-validator.d.ts +55 -0
- package/lib/scanner/project-validator.js +235 -0
- package/lib/scanner/project-validator.js.map +1 -0
- package/lib/scanner/sfdx-project-detector.d.ts +86 -0
- package/lib/scanner/sfdx-project-detector.js +240 -0
- package/lib/scanner/sfdx-project-detector.js.map +1 -0
- package/lib/scanner/structure-validator.d.ts +64 -0
- package/lib/scanner/structure-validator.js +296 -0
- package/lib/scanner/structure-validator.js.map +1 -0
- package/lib/services/metadata-scanner-service.d.ts +64 -0
- package/lib/services/metadata-scanner-service.js +651 -0
- package/lib/services/metadata-scanner-service.js.map +1 -0
- package/lib/types/agentforce.d.ts +157 -0
- package/lib/types/agentforce.js +2 -0
- package/lib/types/agentforce.js.map +1 -0
- package/lib/types/dependency.d.ts +98 -0
- package/lib/types/dependency.js +5 -0
- package/lib/types/dependency.js.map +1 -0
- package/lib/types/deployment-plan.d.ts +81 -0
- package/lib/types/deployment-plan.js +6 -0
- package/lib/types/deployment-plan.js.map +1 -0
- package/lib/types/deployment.d.ts +88 -0
- package/lib/types/deployment.js +5 -0
- package/lib/types/deployment.js.map +1 -0
- package/lib/types/graph.d.ts +35 -0
- package/lib/types/graph.js +5 -0
- package/lib/types/graph.js.map +1 -0
- package/lib/types/index.d.ts +12 -0
- package/lib/types/index.js +17 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/metadata.d.ts +101 -0
- package/lib/types/metadata.js +13 -0
- package/lib/types/metadata.js.map +1 -0
- package/lib/types/project.d.ts +156 -0
- package/lib/types/project.js +56 -0
- package/lib/types/project.js.map +1 -0
- package/lib/types/salesforce/apex.d.ts +94 -0
- package/lib/types/salesforce/apex.js +6 -0
- package/lib/types/salesforce/apex.js.map +1 -0
- package/lib/types/salesforce/aura.d.ts +150 -0
- package/lib/types/salesforce/aura.js +6 -0
- package/lib/types/salesforce/aura.js.map +1 -0
- package/lib/types/salesforce/bot.d.ts +293 -0
- package/lib/types/salesforce/bot.js +6 -0
- package/lib/types/salesforce/bot.js.map +1 -0
- package/lib/types/salesforce/common.d.ts +15 -0
- package/lib/types/salesforce/common.js +5 -0
- package/lib/types/salesforce/common.js.map +1 -0
- package/lib/types/salesforce/custom-metadata.d.ts +92 -0
- package/lib/types/salesforce/custom-metadata.js +6 -0
- package/lib/types/salesforce/custom-metadata.js.map +1 -0
- package/lib/types/salesforce/email.d.ts +56 -0
- package/lib/types/salesforce/email.js +6 -0
- package/lib/types/salesforce/email.js.map +1 -0
- package/lib/types/salesforce/flexipage.d.ts +149 -0
- package/lib/types/salesforce/flexipage.js +6 -0
- package/lib/types/salesforce/flexipage.js.map +1 -0
- package/lib/types/salesforce/flow.d.ts +516 -0
- package/lib/types/salesforce/flow.js +6 -0
- package/lib/types/salesforce/flow.js.map +1 -0
- package/lib/types/salesforce/genai.d.ts +67 -0
- package/lib/types/salesforce/genai.js +6 -0
- package/lib/types/salesforce/genai.js.map +1 -0
- package/lib/types/salesforce/index.d.ts +27 -0
- package/lib/types/salesforce/index.js +43 -0
- package/lib/types/salesforce/index.js.map +1 -0
- package/lib/types/salesforce/layout.d.ts +236 -0
- package/lib/types/salesforce/layout.js +6 -0
- package/lib/types/salesforce/layout.js.map +1 -0
- package/lib/types/salesforce/lwc.d.ts +123 -0
- package/lib/types/salesforce/lwc.js +6 -0
- package/lib/types/salesforce/lwc.js.map +1 -0
- package/lib/types/salesforce/object.d.ts +427 -0
- package/lib/types/salesforce/object.js +6 -0
- package/lib/types/salesforce/object.js.map +1 -0
- package/lib/types/salesforce/parser-types.d.ts +79 -0
- package/lib/types/salesforce/parser-types.js +80 -0
- package/lib/types/salesforce/parser-types.js.map +1 -0
- package/lib/types/salesforce/permission.d.ts +289 -0
- package/lib/types/salesforce/permission.js +6 -0
- package/lib/types/salesforce/permission.js.map +1 -0
- package/lib/types/salesforce/resource.d.ts +93 -0
- package/lib/types/salesforce/resource.js +6 -0
- package/lib/types/salesforce/resource.js.map +1 -0
- package/lib/types/salesforce/visualforce.d.ts +70 -0
- package/lib/types/salesforce/visualforce.js +6 -0
- package/lib/types/salesforce/visualforce.js.map +1 -0
- package/lib/utils/cache-manager.d.ts +158 -0
- package/lib/utils/cache-manager.js +429 -0
- package/lib/utils/cache-manager.js.map +1 -0
- package/lib/utils/deployment-plan-manager.d.ts +40 -0
- package/lib/utils/deployment-plan-manager.js +183 -0
- package/lib/utils/deployment-plan-manager.js.map +1 -0
- package/lib/utils/error-aggregator.d.ts +117 -0
- package/lib/utils/error-aggregator.js +268 -0
- package/lib/utils/error-aggregator.js.map +1 -0
- package/lib/utils/file-system.d.ts +62 -0
- package/lib/utils/file-system.js +167 -0
- package/lib/utils/file-system.js.map +1 -0
- package/lib/utils/functional.d.ts +52 -0
- package/lib/utils/functional.js +61 -0
- package/lib/utils/functional.js.map +1 -0
- package/lib/utils/graph-algorithms.d.ts +53 -0
- package/lib/utils/graph-algorithms.js +177 -0
- package/lib/utils/graph-algorithms.js.map +1 -0
- package/lib/utils/logger.d.ts +154 -0
- package/lib/utils/logger.js +327 -0
- package/lib/utils/logger.js.map +1 -0
- package/lib/utils/network-handler.d.ts +64 -0
- package/lib/utils/network-handler.js +147 -0
- package/lib/utils/network-handler.js.map +1 -0
- package/lib/utils/performance.d.ts +148 -0
- package/lib/utils/performance.js +294 -0
- package/lib/utils/performance.js.map +1 -0
- package/lib/utils/string.d.ts +197 -0
- package/lib/utils/string.js +331 -0
- package/lib/utils/string.js.map +1 -0
- package/lib/utils/xml.d.ts +97 -0
- package/lib/utils/xml.js +227 -0
- package/lib/utils/xml.js.map +1 -0
- package/lib/validators/xml-metadata-validator.d.ts +106 -0
- package/lib/validators/xml-metadata-validator.js +509 -0
- package/lib/validators/xml-metadata-validator.js.map +1 -0
- package/lib/waves/priority-wave-generator-ai.d.ts +85 -0
- package/lib/waves/priority-wave-generator-ai.js +191 -0
- package/lib/waves/priority-wave-generator-ai.js.map +1 -0
- package/lib/waves/priority-wave-generator.d.ts +47 -0
- package/lib/waves/priority-wave-generator.js +88 -0
- package/lib/waves/priority-wave-generator.js.map +1 -0
- package/lib/waves/test-optimizer.d.ts +155 -0
- package/lib/waves/test-optimizer.js +290 -0
- package/lib/waves/test-optimizer.js.map +1 -0
- package/lib/waves/wave-builder.d.ts +147 -0
- package/lib/waves/wave-builder.js +286 -0
- package/lib/waves/wave-builder.js.map +1 -0
- package/lib/waves/wave-diff-generator.d.ts +17 -0
- package/lib/waves/wave-diff-generator.js +6 -0
- package/lib/waves/wave-diff-generator.js.map +1 -0
- package/lib/waves/wave-executor.d.ts +33 -0
- package/lib/waves/wave-executor.js +50 -0
- package/lib/waves/wave-executor.js.map +1 -0
- package/lib/waves/wave-merger.d.ts +96 -0
- package/lib/waves/wave-merger.js +181 -0
- package/lib/waves/wave-merger.js.map +1 -0
- package/lib/waves/wave-metadata-generator.d.ts +13 -0
- package/lib/waves/wave-metadata-generator.js +12 -0
- package/lib/waves/wave-metadata-generator.js.map +1 -0
- package/lib/waves/wave-splitter.d.ts +154 -0
- package/lib/waves/wave-splitter.js +307 -0
- package/lib/waves/wave-splitter.js.map +1 -0
- package/lib/waves/wave-validator.d.ts +17 -0
- package/lib/waves/wave-validator.js +15 -0
- package/lib/waves/wave-validator.js.map +1 -0
- package/messages/analyze.json +18 -0
- package/messages/config.json +29 -0
- package/messages/resume.json +9 -0
- package/messages/start.json +24 -0
- package/messages/status.json +8 -0
- package/messages/validate.json +9 -0
- package/npm-shrinkwrap.json +25676 -0
- package/oclif.lock +11988 -0
- package/oclif.manifest.json +589 -0
- package/package.json +224 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error Aggregator - US-076 Enhancement
|
|
3
|
+
* Aggregates and categorizes errors for comprehensive reporting
|
|
4
|
+
*
|
|
5
|
+
* @ac US-076-AC-5: File and line numbers
|
|
6
|
+
* @ac US-076-AC-6: Error aggregation
|
|
7
|
+
* @issue #76
|
|
8
|
+
*/
|
|
9
|
+
export type AggregatedError = {
|
|
10
|
+
filePath?: string;
|
|
11
|
+
lineNumber?: number;
|
|
12
|
+
columnNumber?: number;
|
|
13
|
+
errorType: string;
|
|
14
|
+
errorMessage: string;
|
|
15
|
+
severity: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
|
|
16
|
+
timestamp: Date;
|
|
17
|
+
stack?: string;
|
|
18
|
+
context?: Record<string, unknown>;
|
|
19
|
+
};
|
|
20
|
+
export type ErrorStats = {
|
|
21
|
+
total: number;
|
|
22
|
+
byType: Map<string, number>;
|
|
23
|
+
bySeverity: Map<string, number>;
|
|
24
|
+
byFile: Map<string, number>;
|
|
25
|
+
};
|
|
26
|
+
export type ErrorReport = {
|
|
27
|
+
totalErrors: number;
|
|
28
|
+
criticalCount: number;
|
|
29
|
+
highCount: number;
|
|
30
|
+
mediumCount: number;
|
|
31
|
+
lowCount: number;
|
|
32
|
+
errors: AggregatedError[];
|
|
33
|
+
stats: ErrorStats;
|
|
34
|
+
timestamp: Date;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* @ac US-076-AC-6: Error aggregation
|
|
38
|
+
*/
|
|
39
|
+
export declare class ErrorAggregator {
|
|
40
|
+
private errors;
|
|
41
|
+
private readonly maxErrors;
|
|
42
|
+
constructor(maxErrors?: number);
|
|
43
|
+
/**
|
|
44
|
+
* @ac US-076-AC-5: File and line numbers
|
|
45
|
+
* Add error with file location
|
|
46
|
+
*/
|
|
47
|
+
addError(error: {
|
|
48
|
+
message: string;
|
|
49
|
+
type?: string;
|
|
50
|
+
severity?: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
|
|
51
|
+
filePath?: string;
|
|
52
|
+
lineNumber?: number;
|
|
53
|
+
columnNumber?: number;
|
|
54
|
+
stack?: string;
|
|
55
|
+
context?: Record<string, unknown>;
|
|
56
|
+
}): void;
|
|
57
|
+
/**
|
|
58
|
+
* Extract file path and line number from stack trace
|
|
59
|
+
*/
|
|
60
|
+
private extractLocationFromStack;
|
|
61
|
+
/**
|
|
62
|
+
* Get all aggregated errors
|
|
63
|
+
*/
|
|
64
|
+
getErrors(): AggregatedError[];
|
|
65
|
+
/**
|
|
66
|
+
* Get errors filtered by severity
|
|
67
|
+
*/
|
|
68
|
+
getErrorsBySeverity(severity: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL'): AggregatedError[];
|
|
69
|
+
/**
|
|
70
|
+
* Get errors filtered by type
|
|
71
|
+
*/
|
|
72
|
+
getErrorsByType(type: string): AggregatedError[];
|
|
73
|
+
/**
|
|
74
|
+
* Get errors filtered by file
|
|
75
|
+
*/
|
|
76
|
+
getErrorsByFile(filePath: string): AggregatedError[];
|
|
77
|
+
/**
|
|
78
|
+
* Generate statistics
|
|
79
|
+
*/
|
|
80
|
+
getStats(): ErrorStats;
|
|
81
|
+
/**
|
|
82
|
+
* Generate comprehensive error report
|
|
83
|
+
*/
|
|
84
|
+
generateReport(): ErrorReport;
|
|
85
|
+
/**
|
|
86
|
+
* Format error report as human-readable string
|
|
87
|
+
*/
|
|
88
|
+
formatReport(includeStackTraces?: boolean): string;
|
|
89
|
+
/**
|
|
90
|
+
* Get severity icon
|
|
91
|
+
*/
|
|
92
|
+
private getSeverityIcon;
|
|
93
|
+
/**
|
|
94
|
+
* Check if there are critical errors
|
|
95
|
+
*/
|
|
96
|
+
hasCriticalErrors(): boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Check if there are high or critical errors
|
|
99
|
+
*/
|
|
100
|
+
hasHighSeverityErrors(): boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Clear all errors
|
|
103
|
+
*/
|
|
104
|
+
clear(): void;
|
|
105
|
+
/**
|
|
106
|
+
* Get error count
|
|
107
|
+
*/
|
|
108
|
+
getCount(): number;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Get global error aggregator instance
|
|
112
|
+
*/
|
|
113
|
+
export declare function getErrorAggregator(): ErrorAggregator;
|
|
114
|
+
/**
|
|
115
|
+
* Reset global error aggregator (for testing)
|
|
116
|
+
*/
|
|
117
|
+
export declare function resetErrorAggregator(): void;
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error Aggregator - US-076 Enhancement
|
|
3
|
+
* Aggregates and categorizes errors for comprehensive reporting
|
|
4
|
+
*
|
|
5
|
+
* @ac US-076-AC-5: File and line numbers
|
|
6
|
+
* @ac US-076-AC-6: Error aggregation
|
|
7
|
+
* @issue #76
|
|
8
|
+
*/
|
|
9
|
+
import { getLogger } from './logger.js';
|
|
10
|
+
const logger = getLogger('ErrorAggregator');
|
|
11
|
+
/**
|
|
12
|
+
* @ac US-076-AC-6: Error aggregation
|
|
13
|
+
*/
|
|
14
|
+
export class ErrorAggregator {
|
|
15
|
+
errors = [];
|
|
16
|
+
maxErrors;
|
|
17
|
+
constructor(maxErrors = 1000) {
|
|
18
|
+
this.maxErrors = maxErrors;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @ac US-076-AC-5: File and line numbers
|
|
22
|
+
* Add error with file location
|
|
23
|
+
*/
|
|
24
|
+
addError(error) {
|
|
25
|
+
// Extract file/line from stack if not provided
|
|
26
|
+
let { filePath, lineNumber, columnNumber } = error;
|
|
27
|
+
if (!filePath && error.stack) {
|
|
28
|
+
const location = this.extractLocationFromStack(error.stack);
|
|
29
|
+
filePath = filePath ?? location.filePath;
|
|
30
|
+
lineNumber = lineNumber ?? location.lineNumber;
|
|
31
|
+
columnNumber = columnNumber ?? location.columnNumber;
|
|
32
|
+
}
|
|
33
|
+
const aggregatedError = {
|
|
34
|
+
filePath,
|
|
35
|
+
lineNumber,
|
|
36
|
+
columnNumber,
|
|
37
|
+
errorType: error.type ?? 'UnknownError',
|
|
38
|
+
errorMessage: error.message,
|
|
39
|
+
severity: error.severity ?? 'MEDIUM',
|
|
40
|
+
timestamp: new Date(),
|
|
41
|
+
stack: error.stack,
|
|
42
|
+
context: error.context,
|
|
43
|
+
};
|
|
44
|
+
this.errors.push(aggregatedError);
|
|
45
|
+
// Trim if exceeding max
|
|
46
|
+
if (this.errors.length > this.maxErrors) {
|
|
47
|
+
this.errors.shift();
|
|
48
|
+
logger.warn('Error buffer full, dropping oldest error');
|
|
49
|
+
}
|
|
50
|
+
logger.debug('Error added to aggregator', {
|
|
51
|
+
type: aggregatedError.errorType,
|
|
52
|
+
severity: aggregatedError.severity,
|
|
53
|
+
file: filePath,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Extract file path and line number from stack trace
|
|
58
|
+
*/
|
|
59
|
+
extractLocationFromStack(stack) {
|
|
60
|
+
// Match patterns like:
|
|
61
|
+
// at Object.<anonymous> (/path/to/file.ts:123:45)
|
|
62
|
+
// at /path/to/file.ts:123:45
|
|
63
|
+
const patterns = [
|
|
64
|
+
/\((.+):(\d+):(\d+)\)/, // (path:line:col)
|
|
65
|
+
/at (.+):(\d+):(\d+)/, // at path:line:col
|
|
66
|
+
/(.+):(\d+):(\d+)$/, // path:line:col at end
|
|
67
|
+
];
|
|
68
|
+
for (const pattern of patterns) {
|
|
69
|
+
const match = pattern.exec(stack);
|
|
70
|
+
if (match) {
|
|
71
|
+
return {
|
|
72
|
+
filePath: match[1],
|
|
73
|
+
lineNumber: Number.parseInt(match[2], 10),
|
|
74
|
+
columnNumber: Number.parseInt(match[3], 10),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return {};
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Get all aggregated errors
|
|
82
|
+
*/
|
|
83
|
+
getErrors() {
|
|
84
|
+
return [...this.errors];
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Get errors filtered by severity
|
|
88
|
+
*/
|
|
89
|
+
getErrorsBySeverity(severity) {
|
|
90
|
+
return this.errors.filter((e) => e.severity === severity);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Get errors filtered by type
|
|
94
|
+
*/
|
|
95
|
+
getErrorsByType(type) {
|
|
96
|
+
return this.errors.filter((e) => e.errorType === type);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Get errors filtered by file
|
|
100
|
+
*/
|
|
101
|
+
getErrorsByFile(filePath) {
|
|
102
|
+
return this.errors.filter((e) => e.filePath === filePath);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Generate statistics
|
|
106
|
+
*/
|
|
107
|
+
getStats() {
|
|
108
|
+
const stats = {
|
|
109
|
+
total: this.errors.length,
|
|
110
|
+
byType: new Map(),
|
|
111
|
+
bySeverity: new Map(),
|
|
112
|
+
byFile: new Map(),
|
|
113
|
+
};
|
|
114
|
+
for (const error of this.errors) {
|
|
115
|
+
// Count by type
|
|
116
|
+
stats.byType.set(error.errorType, (stats.byType.get(error.errorType) ?? 0) + 1);
|
|
117
|
+
// Count by severity
|
|
118
|
+
stats.bySeverity.set(error.severity, (stats.bySeverity.get(error.severity) ?? 0) + 1);
|
|
119
|
+
// Count by file
|
|
120
|
+
if (error.filePath) {
|
|
121
|
+
stats.byFile.set(error.filePath, (stats.byFile.get(error.filePath) ?? 0) + 1);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return stats;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Generate comprehensive error report
|
|
128
|
+
*/
|
|
129
|
+
generateReport() {
|
|
130
|
+
const stats = this.getStats();
|
|
131
|
+
return {
|
|
132
|
+
totalErrors: this.errors.length,
|
|
133
|
+
criticalCount: stats.bySeverity.get('CRITICAL') ?? 0,
|
|
134
|
+
highCount: stats.bySeverity.get('HIGH') ?? 0,
|
|
135
|
+
mediumCount: stats.bySeverity.get('MEDIUM') ?? 0,
|
|
136
|
+
lowCount: stats.bySeverity.get('LOW') ?? 0,
|
|
137
|
+
errors: this.getErrors(),
|
|
138
|
+
stats,
|
|
139
|
+
timestamp: new Date(),
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Format error report as human-readable string
|
|
144
|
+
*/
|
|
145
|
+
formatReport(includeStackTraces = false) {
|
|
146
|
+
const report = this.generateReport();
|
|
147
|
+
const lines = [];
|
|
148
|
+
lines.push('🚨 Error Report');
|
|
149
|
+
lines.push('═══════════════════════════════════════');
|
|
150
|
+
lines.push(`📊 Total Errors: ${report.totalErrors}`);
|
|
151
|
+
lines.push('');
|
|
152
|
+
lines.push('📈 By Severity:');
|
|
153
|
+
lines.push(` 🔴 CRITICAL: ${report.criticalCount}`);
|
|
154
|
+
lines.push(` 🟠 HIGH: ${report.highCount}`);
|
|
155
|
+
lines.push(` 🟡 MEDIUM: ${report.mediumCount}`);
|
|
156
|
+
lines.push(` 🟢 LOW: ${report.lowCount}`);
|
|
157
|
+
lines.push('');
|
|
158
|
+
if (report.stats.byType.size > 0) {
|
|
159
|
+
lines.push('🏷️ By Type:');
|
|
160
|
+
const sortedTypes = Array.from(report.stats.byType.entries()).sort((a, b) => b[1] - a[1]);
|
|
161
|
+
for (const [type, count] of sortedTypes.slice(0, 10)) {
|
|
162
|
+
lines.push(` ${type}: ${count}`);
|
|
163
|
+
}
|
|
164
|
+
if (sortedTypes.length > 10) {
|
|
165
|
+
lines.push(` ... and ${sortedTypes.length - 10} more`);
|
|
166
|
+
}
|
|
167
|
+
lines.push('');
|
|
168
|
+
}
|
|
169
|
+
if (report.stats.byFile.size > 0) {
|
|
170
|
+
lines.push('📁 Files with Most Errors:');
|
|
171
|
+
const sortedFiles = Array.from(report.stats.byFile.entries()).sort((a, b) => b[1] - a[1]);
|
|
172
|
+
for (const [file, count] of sortedFiles.slice(0, 10)) {
|
|
173
|
+
lines.push(` ${file}: ${count} errors`);
|
|
174
|
+
}
|
|
175
|
+
if (sortedFiles.length > 10) {
|
|
176
|
+
lines.push(` ... and ${sortedFiles.length - 10} more files`);
|
|
177
|
+
}
|
|
178
|
+
lines.push('');
|
|
179
|
+
}
|
|
180
|
+
// List errors (limit to first 20)
|
|
181
|
+
if (report.errors.length > 0) {
|
|
182
|
+
lines.push('📋 Error Details:');
|
|
183
|
+
const errorsToShow = report.errors.slice(0, 20);
|
|
184
|
+
for (const [index, error] of errorsToShow.entries()) {
|
|
185
|
+
const severity = this.getSeverityIcon(error.severity);
|
|
186
|
+
lines.push(`\n${index + 1}. ${severity} ${error.errorType}`);
|
|
187
|
+
lines.push(` Message: ${error.errorMessage}`);
|
|
188
|
+
if (error.filePath) {
|
|
189
|
+
lines.push(` Location: ${error.filePath}:${error.lineNumber ?? '?'}:${error.columnNumber ?? '?'}`);
|
|
190
|
+
}
|
|
191
|
+
if (error.context && Object.keys(error.context).length > 0) {
|
|
192
|
+
lines.push(` Context: ${JSON.stringify(error.context)}`);
|
|
193
|
+
}
|
|
194
|
+
if (includeStackTraces && error.stack) {
|
|
195
|
+
lines.push(` Stack:\n${error.stack.split('\n').slice(0, 5).join('\n')}`);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
if (report.errors.length > 20) {
|
|
199
|
+
lines.push(`\n... and ${report.errors.length - 20} more errors`);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
lines.push('');
|
|
203
|
+
lines.push(`📅 Generated: ${report.timestamp.toISOString()}`);
|
|
204
|
+
return lines.join('\n');
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Get severity icon
|
|
208
|
+
*/
|
|
209
|
+
getSeverityIcon(severity) {
|
|
210
|
+
switch (severity) {
|
|
211
|
+
case 'CRITICAL':
|
|
212
|
+
return '🔴';
|
|
213
|
+
case 'HIGH':
|
|
214
|
+
return '🟠';
|
|
215
|
+
case 'MEDIUM':
|
|
216
|
+
return '🟡';
|
|
217
|
+
case 'LOW':
|
|
218
|
+
return '🟢';
|
|
219
|
+
default:
|
|
220
|
+
return '⚪';
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Check if there are critical errors
|
|
225
|
+
*/
|
|
226
|
+
hasCriticalErrors() {
|
|
227
|
+
return this.errors.some((e) => e.severity === 'CRITICAL');
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Check if there are high or critical errors
|
|
231
|
+
*/
|
|
232
|
+
hasHighSeverityErrors() {
|
|
233
|
+
return this.errors.some((e) => e.severity === 'CRITICAL' || e.severity === 'HIGH');
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Clear all errors
|
|
237
|
+
*/
|
|
238
|
+
clear() {
|
|
239
|
+
this.errors = [];
|
|
240
|
+
logger.debug('Error aggregator cleared');
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Get error count
|
|
244
|
+
*/
|
|
245
|
+
getCount() {
|
|
246
|
+
return this.errors.length;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Global error aggregator instance
|
|
251
|
+
*/
|
|
252
|
+
let globalAggregator = null;
|
|
253
|
+
/**
|
|
254
|
+
* Get global error aggregator instance
|
|
255
|
+
*/
|
|
256
|
+
export function getErrorAggregator() {
|
|
257
|
+
if (!globalAggregator) {
|
|
258
|
+
globalAggregator = new ErrorAggregator();
|
|
259
|
+
}
|
|
260
|
+
return globalAggregator;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Reset global error aggregator (for testing)
|
|
264
|
+
*/
|
|
265
|
+
export function resetErrorAggregator() {
|
|
266
|
+
globalAggregator = null;
|
|
267
|
+
}
|
|
268
|
+
//# sourceMappingURL=error-aggregator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-aggregator.js","sourceRoot":"","sources":["../../src/utils/error-aggregator.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,MAAM,GAAG,SAAS,CAAC,iBAAiB,CAAC,CAAC;AAgC5C;;GAEG;AACH,MAAM,OAAO,eAAe;IAClB,MAAM,GAAsB,EAAE,CAAC;IACtB,SAAS,CAAS;IAEnC,YAAmB,YAAoB,IAAI;QACzC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACI,QAAQ,CAAC,KASf;QACC,+CAA+C;QAC/C,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;QACnD,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC,KAAK,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;IAC5B,CAAC;CACF;AAED;;GAEG;AACH,IAAI,gBAAgB,GAA2B,IAAI,CAAC;AAEpD;;GAEG;AACH,MAAM,UAAU,kBAAkB;IAChC,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACtB,gBAAgB,GAAG,IAAI,eAAe,EAAE,CAAC;IAC3C,CAAC;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB;IAClC,gBAAgB,GAAG,IAAI,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File System Utilities
|
|
3
|
+
*
|
|
4
|
+
* Provides safe file system operations with proper error handling
|
|
5
|
+
*/
|
|
6
|
+
export type FileReadResult = {
|
|
7
|
+
content: string;
|
|
8
|
+
encoding: string;
|
|
9
|
+
isBinary: boolean;
|
|
10
|
+
filePath: string;
|
|
11
|
+
size: number;
|
|
12
|
+
};
|
|
13
|
+
export type ScanOptions = {
|
|
14
|
+
pattern: string;
|
|
15
|
+
recursive?: boolean;
|
|
16
|
+
followSymlinks?: boolean;
|
|
17
|
+
ignorePatterns?: string[];
|
|
18
|
+
maxDepth?: number;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Reads file with encoding detection
|
|
22
|
+
*
|
|
23
|
+
* @ac US-003-AC-1
|
|
24
|
+
*/
|
|
25
|
+
export declare function readFileWithEncoding(filePath: string): Promise<FileReadResult>;
|
|
26
|
+
/**
|
|
27
|
+
* Scans directory recursively with glob patterns
|
|
28
|
+
*
|
|
29
|
+
* @ac US-003-AC-2
|
|
30
|
+
*/
|
|
31
|
+
export declare function scanDirectory(directoryPath: string, options: ScanOptions): Promise<string[]>;
|
|
32
|
+
/**
|
|
33
|
+
* Parses XML file with namespace support
|
|
34
|
+
* Uses XML Utils (Issue #10) for robust parsing
|
|
35
|
+
*
|
|
36
|
+
* @ac US-003-AC-3
|
|
37
|
+
*/
|
|
38
|
+
export declare function parseXmlFile(xmlFilePath: string): Promise<unknown>;
|
|
39
|
+
/**
|
|
40
|
+
* Check if file/directory is accessible
|
|
41
|
+
*
|
|
42
|
+
* @ac US-003-AC-4 (Handles permission errors gracefully)
|
|
43
|
+
*/
|
|
44
|
+
export declare function isAccessible(filePath: string): Promise<boolean>;
|
|
45
|
+
/**
|
|
46
|
+
* Check if path is a symlink
|
|
47
|
+
*
|
|
48
|
+
* @ac US-003-AC-5 (Supports symlinks)
|
|
49
|
+
*/
|
|
50
|
+
export declare function isSymlink(filePath: string): Promise<boolean>;
|
|
51
|
+
/**
|
|
52
|
+
* Get file size in bytes
|
|
53
|
+
*
|
|
54
|
+
* @ac US-003-AC-5 (Supports large files >10MB)
|
|
55
|
+
*/
|
|
56
|
+
export declare function getFileSize(filePath: string): Promise<number>;
|
|
57
|
+
/**
|
|
58
|
+
* Check if file is larger than threshold
|
|
59
|
+
*
|
|
60
|
+
* @ac US-003-AC-5 (Supports large files >10MB)
|
|
61
|
+
*/
|
|
62
|
+
export declare function isLargeFile(filePath: string, thresholdMB?: number): Promise<boolean>;
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File System Utilities
|
|
3
|
+
*
|
|
4
|
+
* Provides safe file system operations with proper error handling
|
|
5
|
+
*/
|
|
6
|
+
import fs from 'node:fs/promises';
|
|
7
|
+
import path from 'node:path';
|
|
8
|
+
import { glob } from 'glob';
|
|
9
|
+
import { getLogger } from './logger.js';
|
|
10
|
+
import { parseXmlFile as parseXmlWithUtils, validateXml } from './xml.js';
|
|
11
|
+
const logger = getLogger('FileSystemUtils');
|
|
12
|
+
/**
|
|
13
|
+
* Reads file with encoding detection
|
|
14
|
+
*
|
|
15
|
+
* @ac US-003-AC-1
|
|
16
|
+
*/
|
|
17
|
+
export async function readFileWithEncoding(filePath) {
|
|
18
|
+
try {
|
|
19
|
+
const [fileBuffer, stats] = await Promise.all([fs.readFile(filePath), fs.stat(filePath)]);
|
|
20
|
+
// Detect if binary by checking for null bytes
|
|
21
|
+
const isBinary = fileBuffer.includes(0x00);
|
|
22
|
+
if (isBinary) {
|
|
23
|
+
logger.debug('Binary file detected', { filePath, size: stats.size });
|
|
24
|
+
return {
|
|
25
|
+
content: '',
|
|
26
|
+
encoding: 'binary',
|
|
27
|
+
isBinary: true,
|
|
28
|
+
filePath,
|
|
29
|
+
size: stats.size,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
// Assume UTF-8 for text files
|
|
33
|
+
const textContent = fileBuffer.toString('utf-8');
|
|
34
|
+
return {
|
|
35
|
+
content: textContent,
|
|
36
|
+
encoding: 'utf-8',
|
|
37
|
+
isBinary: false,
|
|
38
|
+
filePath,
|
|
39
|
+
size: stats.size,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
logger.error('Failed to read file', { error, filePath });
|
|
44
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
45
|
+
throw new Error(`Failed to read file '${filePath}': ${errorMessage}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Scans directory recursively with glob patterns
|
|
50
|
+
*
|
|
51
|
+
* @ac US-003-AC-2
|
|
52
|
+
*/
|
|
53
|
+
export async function scanDirectory(directoryPath, options) {
|
|
54
|
+
try {
|
|
55
|
+
const { pattern, recursive = true, followSymlinks = false, ignorePatterns = [], maxDepth } = options;
|
|
56
|
+
const globPattern = recursive ? pattern : path.join(directoryPath, pattern);
|
|
57
|
+
const matchedFiles = await glob(globPattern, {
|
|
58
|
+
cwd: directoryPath,
|
|
59
|
+
absolute: true,
|
|
60
|
+
follow: followSymlinks,
|
|
61
|
+
ignore: ignorePatterns,
|
|
62
|
+
nodir: true,
|
|
63
|
+
maxDepth,
|
|
64
|
+
withFileTypes: false, // Ensure we get strings, not Path objects
|
|
65
|
+
});
|
|
66
|
+
logger.debug('Directory scan completed', {
|
|
67
|
+
directoryPath,
|
|
68
|
+
pattern,
|
|
69
|
+
filesFound: matchedFiles.length,
|
|
70
|
+
});
|
|
71
|
+
return matchedFiles;
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
logger.error('Failed to scan directory', { error, directoryPath, options });
|
|
75
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
76
|
+
throw new Error(`Failed to scan directory '${directoryPath}': ${errorMessage}`);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Parses XML file with namespace support
|
|
81
|
+
* Uses XML Utils (Issue #10) for robust parsing
|
|
82
|
+
*
|
|
83
|
+
* @ac US-003-AC-3
|
|
84
|
+
*/
|
|
85
|
+
export async function parseXmlFile(xmlFilePath) {
|
|
86
|
+
try {
|
|
87
|
+
// Validate before parsing
|
|
88
|
+
const content = await fs.readFile(xmlFilePath, 'utf-8');
|
|
89
|
+
const validation = validateXml(content);
|
|
90
|
+
if (validation !== true) {
|
|
91
|
+
logger.warn('XML validation failed', {
|
|
92
|
+
filePath: xmlFilePath,
|
|
93
|
+
error: validation.err,
|
|
94
|
+
});
|
|
95
|
+
throw new Error(`Invalid XML: ${validation.err.msg} at line ${validation.err.line}`);
|
|
96
|
+
}
|
|
97
|
+
// Parse using XML Utils
|
|
98
|
+
const parsed = await parseXmlWithUtils(xmlFilePath);
|
|
99
|
+
logger.debug('XML file parsed successfully', { filePath: xmlFilePath });
|
|
100
|
+
return parsed;
|
|
101
|
+
}
|
|
102
|
+
catch (error) {
|
|
103
|
+
logger.error('Failed to parse XML file', { error, filePath: xmlFilePath });
|
|
104
|
+
throw error;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Check if file/directory is accessible
|
|
109
|
+
*
|
|
110
|
+
* @ac US-003-AC-4 (Handles permission errors gracefully)
|
|
111
|
+
*/
|
|
112
|
+
export async function isAccessible(filePath) {
|
|
113
|
+
try {
|
|
114
|
+
await fs.access(filePath, fs.constants.R_OK);
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
catch {
|
|
118
|
+
logger.warn('File not accessible', { filePath });
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Check if path is a symlink
|
|
124
|
+
*
|
|
125
|
+
* @ac US-003-AC-5 (Supports symlinks)
|
|
126
|
+
*/
|
|
127
|
+
export async function isSymlink(filePath) {
|
|
128
|
+
try {
|
|
129
|
+
const stats = await fs.lstat(filePath);
|
|
130
|
+
return stats.isSymbolicLink();
|
|
131
|
+
}
|
|
132
|
+
catch (error) {
|
|
133
|
+
logger.error('Failed to check if symlink', { error, filePath });
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Get file size in bytes
|
|
139
|
+
*
|
|
140
|
+
* @ac US-003-AC-5 (Supports large files >10MB)
|
|
141
|
+
*/
|
|
142
|
+
export async function getFileSize(filePath) {
|
|
143
|
+
try {
|
|
144
|
+
const stats = await fs.stat(filePath);
|
|
145
|
+
return stats.size;
|
|
146
|
+
}
|
|
147
|
+
catch (error) {
|
|
148
|
+
logger.error('Failed to get file size', { error, filePath });
|
|
149
|
+
throw new Error(`Failed to get file size for '${filePath}': ${error.message}`);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Check if file is larger than threshold
|
|
154
|
+
*
|
|
155
|
+
* @ac US-003-AC-5 (Supports large files >10MB)
|
|
156
|
+
*/
|
|
157
|
+
export async function isLargeFile(filePath, thresholdMB = 10) {
|
|
158
|
+
try {
|
|
159
|
+
const size = await getFileSize(filePath);
|
|
160
|
+
const sizeMB = size / (1024 * 1024);
|
|
161
|
+
return sizeMB > thresholdMB;
|
|
162
|
+
}
|
|
163
|
+
catch {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=file-system.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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