@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,55 @@
|
|
|
1
|
+
import type { AuraComponentMetadata, AuraComponentType } from '../types/salesforce/aura.js';
|
|
2
|
+
/**
|
|
3
|
+
* Aura dependency types
|
|
4
|
+
*/
|
|
5
|
+
export type AuraDependencyType = 'apex_controller' | 'child_component' | 'event' | 'interface' | 'extends' | 'helper';
|
|
6
|
+
/**
|
|
7
|
+
* Represents a dependency found in an Aura component
|
|
8
|
+
*/
|
|
9
|
+
export type AuraDependency = {
|
|
10
|
+
type: AuraDependencyType;
|
|
11
|
+
name: string;
|
|
12
|
+
namespace?: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Result of parsing an Aura component
|
|
16
|
+
* Optionally includes metadata from .cmp-meta.xml, .app-meta.xml, etc.
|
|
17
|
+
*/
|
|
18
|
+
export type AuraParseResult = {
|
|
19
|
+
componentName: string;
|
|
20
|
+
componentType: AuraComponentType;
|
|
21
|
+
apexController?: string;
|
|
22
|
+
extendsComponent?: string;
|
|
23
|
+
implementsInterfaces: string[];
|
|
24
|
+
childComponents: string[];
|
|
25
|
+
events: string[];
|
|
26
|
+
dependencies: AuraDependency[];
|
|
27
|
+
hasController: boolean;
|
|
28
|
+
hasHelper: boolean;
|
|
29
|
+
hasStyle: boolean;
|
|
30
|
+
metadata?: AuraComponentMetadata;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Parse an Aura component and extract dependencies
|
|
34
|
+
*
|
|
35
|
+
* @param componentName - Name of the Aura component
|
|
36
|
+
* @param cmpContent - Content of the .cmp file
|
|
37
|
+
* @param hasController - Whether the component has a controller.js file
|
|
38
|
+
* @param hasHelper - Whether the component has a helper.js file
|
|
39
|
+
* @param hasStyle - Whether the component has a style.css file
|
|
40
|
+
* @returns AuraParseResult with all extracted dependencies
|
|
41
|
+
*
|
|
42
|
+
* @throws {ParsingError} If the component cannot be parsed
|
|
43
|
+
*
|
|
44
|
+
* @ac US-017-AC-6: Validate bundle structure
|
|
45
|
+
* @ac US-017-AC-7: Parse all bundle files (.cmp, .js, .css, etc.)
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```typescript
|
|
49
|
+
* const result = parseAura('MyComponent', cmpContent, true, true, false);
|
|
50
|
+
* console.log(result.apexController); // 'MyController'
|
|
51
|
+
* console.log(result.childComponents); // ['c:ChildComponent']
|
|
52
|
+
* console.log(result.events); // ['c:MyEvent']
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export declare function parseAura(componentName: string, cmpContent: string, hasController?: boolean, hasHelper?: boolean, hasStyle?: boolean): AuraParseResult;
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { getLogger } from '../utils/logger.js';
|
|
2
|
+
import { ParsingError } from '../errors/parsing-error.js';
|
|
3
|
+
const logger = getLogger('AuraParser');
|
|
4
|
+
/**
|
|
5
|
+
* Extract Apex controller from component markup
|
|
6
|
+
*
|
|
7
|
+
* @ac US-017-AC-1: Extract controller Apex class
|
|
8
|
+
*/
|
|
9
|
+
function extractApexController(cmpXml) {
|
|
10
|
+
// Pattern: controller="MyController" or controller="ns__MyController"
|
|
11
|
+
const controllerMatch = cmpXml.match(/controller\s*=\s*["']([a-zA-Z][a-zA-Z0-9_.]*?)["']/);
|
|
12
|
+
return controllerMatch ? controllerMatch[1] : undefined;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Extract component extends relationship
|
|
16
|
+
*
|
|
17
|
+
* @ac US-017-AC-5: Extract interface implementations (also handles extends)
|
|
18
|
+
*/
|
|
19
|
+
function extractExtends(cmpXml) {
|
|
20
|
+
// Pattern: extends="c:BaseComponent" or extends="namespace:BaseComponent"
|
|
21
|
+
const extendsMatch = cmpXml.match(/extends\s*=\s*["']([a-zA-Z][a-zA-Z0-9_:]*?)["']/);
|
|
22
|
+
return extendsMatch ? extendsMatch[1] : undefined;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Extract interface implementations
|
|
26
|
+
*
|
|
27
|
+
* @ac US-017-AC-5: Extract interface implementations
|
|
28
|
+
*/
|
|
29
|
+
function extractImplements(cmpXml) {
|
|
30
|
+
// Pattern: implements="flexipage:availableForAllPageTypes,force:hasRecordId"
|
|
31
|
+
const implementsMatch = cmpXml.match(/implements\s*=\s*["']([^"']+)["']/);
|
|
32
|
+
if (!implementsMatch) {
|
|
33
|
+
return [];
|
|
34
|
+
}
|
|
35
|
+
return implementsMatch[1]
|
|
36
|
+
.split(',')
|
|
37
|
+
.map((impl) => impl.trim())
|
|
38
|
+
.filter((impl) => impl.length > 0);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Extract child component references
|
|
42
|
+
*
|
|
43
|
+
* @ac US-017-AC-3: Extract child component references
|
|
44
|
+
*/
|
|
45
|
+
function extractChildComponents(cmpXml) {
|
|
46
|
+
const children = [];
|
|
47
|
+
// Pattern: <c:ChildComponent ... /> or <namespace:ComponentName ... />
|
|
48
|
+
const componentPattern = /<([a-zA-Z][a-zA-Z0-9_]*):([a-zA-Z][a-zA-Z0-9_]*)[^>]*\/>/g;
|
|
49
|
+
const matches = cmpXml.matchAll(componentPattern);
|
|
50
|
+
for (const match of matches) {
|
|
51
|
+
const namespace = match[1];
|
|
52
|
+
const componentName = match[2];
|
|
53
|
+
// Exclude aura: namespace (framework components)
|
|
54
|
+
if (namespace !== 'aura' && namespace !== 'lightning' && namespace !== 'ui') {
|
|
55
|
+
const fullName = `${namespace}:${componentName}`;
|
|
56
|
+
if (!children.includes(fullName)) {
|
|
57
|
+
children.push(fullName);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
// Also check for non-self-closing tags: <c:ChildComponent>...</c:ChildComponent>
|
|
62
|
+
const openTagPattern = /<([a-zA-Z][a-zA-Z0-9_]*):([a-zA-Z][a-zA-Z0-9_]*)[^/>]*>/g;
|
|
63
|
+
const openMatches = cmpXml.matchAll(openTagPattern);
|
|
64
|
+
for (const match of openMatches) {
|
|
65
|
+
const namespace = match[1];
|
|
66
|
+
const componentName = match[2];
|
|
67
|
+
if (namespace !== 'aura' && namespace !== 'lightning' && namespace !== 'ui') {
|
|
68
|
+
const fullName = `${namespace}:${componentName}`;
|
|
69
|
+
if (!children.includes(fullName)) {
|
|
70
|
+
children.push(fullName);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return children;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Extract event references
|
|
78
|
+
*
|
|
79
|
+
* @ac US-017-AC-4: Extract event references
|
|
80
|
+
*/
|
|
81
|
+
function extractEvents(cmpXml) {
|
|
82
|
+
const events = [];
|
|
83
|
+
// Pattern: <aura:registerEvent name="myEvent" type="c:MyEvent"/>
|
|
84
|
+
const registerPattern = /<aura:registerEvent[^>]*type\s*=\s*["']([a-zA-Z][a-zA-Z0-9_:]*?)["']/g;
|
|
85
|
+
const registerMatches = cmpXml.matchAll(registerPattern);
|
|
86
|
+
for (const match of registerMatches) {
|
|
87
|
+
const eventType = match[1];
|
|
88
|
+
if (!events.includes(eventType)) {
|
|
89
|
+
events.push(eventType);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
// Pattern: <aura:handler event="c:MyEvent" action="{!c.handleEvent}"/>
|
|
93
|
+
const handlerPattern = /<aura:handler[^>]*event\s*=\s*["']([a-zA-Z][a-zA-Z0-9_:]*?)["']/g;
|
|
94
|
+
const handlerMatches = cmpXml.matchAll(handlerPattern);
|
|
95
|
+
for (const match of handlerMatches) {
|
|
96
|
+
const eventType = match[1];
|
|
97
|
+
if (!events.includes(eventType)) {
|
|
98
|
+
events.push(eventType);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return events;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Determine component type from XML
|
|
105
|
+
*/
|
|
106
|
+
function getComponentType(cmpXml) {
|
|
107
|
+
if (cmpXml.includes('<aura:application')) {
|
|
108
|
+
return 'application';
|
|
109
|
+
}
|
|
110
|
+
if (cmpXml.includes('<aura:event')) {
|
|
111
|
+
return 'event';
|
|
112
|
+
}
|
|
113
|
+
if (cmpXml.includes('<aura:interface')) {
|
|
114
|
+
return 'interface';
|
|
115
|
+
}
|
|
116
|
+
return 'component';
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Parse an Aura component and extract dependencies
|
|
120
|
+
*
|
|
121
|
+
* @param componentName - Name of the Aura component
|
|
122
|
+
* @param cmpContent - Content of the .cmp file
|
|
123
|
+
* @param hasController - Whether the component has a controller.js file
|
|
124
|
+
* @param hasHelper - Whether the component has a helper.js file
|
|
125
|
+
* @param hasStyle - Whether the component has a style.css file
|
|
126
|
+
* @returns AuraParseResult with all extracted dependencies
|
|
127
|
+
*
|
|
128
|
+
* @throws {ParsingError} If the component cannot be parsed
|
|
129
|
+
*
|
|
130
|
+
* @ac US-017-AC-6: Validate bundle structure
|
|
131
|
+
* @ac US-017-AC-7: Parse all bundle files (.cmp, .js, .css, etc.)
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* ```typescript
|
|
135
|
+
* const result = parseAura('MyComponent', cmpContent, true, true, false);
|
|
136
|
+
* console.log(result.apexController); // 'MyController'
|
|
137
|
+
* console.log(result.childComponents); // ['c:ChildComponent']
|
|
138
|
+
* console.log(result.events); // ['c:MyEvent']
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
export function parseAura(componentName, cmpContent, hasController = false, hasHelper = false, hasStyle = false) {
|
|
142
|
+
try {
|
|
143
|
+
logger.debug(`Parsing Aura component: ${componentName}`);
|
|
144
|
+
// Determine component type
|
|
145
|
+
const componentType = getComponentType(cmpContent);
|
|
146
|
+
// Extract dependencies
|
|
147
|
+
const apexController = extractApexController(cmpContent);
|
|
148
|
+
const extendsComponent = extractExtends(cmpContent);
|
|
149
|
+
const implementsInterfaces = extractImplements(cmpContent);
|
|
150
|
+
const childComponents = extractChildComponents(cmpContent);
|
|
151
|
+
const events = extractEvents(cmpContent);
|
|
152
|
+
// Build dependencies array
|
|
153
|
+
const dependencies = [];
|
|
154
|
+
if (apexController) {
|
|
155
|
+
dependencies.push({
|
|
156
|
+
type: 'apex_controller',
|
|
157
|
+
name: apexController,
|
|
158
|
+
namespace: apexController.includes('__') ? apexController.split('__')[0] : undefined,
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
if (extendsComponent) {
|
|
162
|
+
dependencies.push({
|
|
163
|
+
type: 'extends',
|
|
164
|
+
name: extendsComponent,
|
|
165
|
+
namespace: extendsComponent.includes(':') ? extendsComponent.split(':')[0] : undefined,
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
for (const iface of implementsInterfaces) {
|
|
169
|
+
dependencies.push({
|
|
170
|
+
type: 'interface',
|
|
171
|
+
name: iface,
|
|
172
|
+
namespace: iface.includes(':') ? iface.split(':')[0] : undefined,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
for (const child of childComponents) {
|
|
176
|
+
dependencies.push({
|
|
177
|
+
type: 'child_component',
|
|
178
|
+
name: child,
|
|
179
|
+
namespace: child.includes(':') ? child.split(':')[0] : undefined,
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
for (const event of events) {
|
|
183
|
+
dependencies.push({
|
|
184
|
+
type: 'event',
|
|
185
|
+
name: event,
|
|
186
|
+
namespace: event.includes(':') ? event.split(':')[0] : undefined,
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
if (hasHelper) {
|
|
190
|
+
dependencies.push({
|
|
191
|
+
type: 'helper',
|
|
192
|
+
name: `${componentName}Helper`,
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
const result = {
|
|
196
|
+
componentName,
|
|
197
|
+
componentType,
|
|
198
|
+
apexController,
|
|
199
|
+
extendsComponent,
|
|
200
|
+
implementsInterfaces,
|
|
201
|
+
childComponents,
|
|
202
|
+
events,
|
|
203
|
+
dependencies,
|
|
204
|
+
hasController,
|
|
205
|
+
hasHelper,
|
|
206
|
+
hasStyle,
|
|
207
|
+
};
|
|
208
|
+
logger.debug(`Parsed Aura component: ${componentName}`, {
|
|
209
|
+
componentType,
|
|
210
|
+
apexController: !!apexController,
|
|
211
|
+
extendsComponent: !!extendsComponent,
|
|
212
|
+
implementsInterfaces: implementsInterfaces.length,
|
|
213
|
+
childComponents: childComponents.length,
|
|
214
|
+
events: events.length,
|
|
215
|
+
dependencies: dependencies.length,
|
|
216
|
+
});
|
|
217
|
+
return result;
|
|
218
|
+
}
|
|
219
|
+
catch (error) {
|
|
220
|
+
if (error instanceof ParsingError) {
|
|
221
|
+
throw error;
|
|
222
|
+
}
|
|
223
|
+
throw new ParsingError(`Failed to parse Aura component: ${componentName}`, {
|
|
224
|
+
filePath: componentName,
|
|
225
|
+
originalError: error instanceof Error ? error.message : String(error),
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
//# sourceMappingURL=aura-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aura-parser.js","sourceRoot":"","sources":["../../src/parsers/aura-parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG1D,MAAM,MAAM,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC;AAmCvC;;;;GAIG;AACH,SAAS,qBAAqB,CAAC,MAAc;IAC3C,sEAAsE;IACtE,MAAM,eAAe,GAAG,MAAM,CAAC,KAAK,CAAC,oDAAoD,CAAC,CAAC;IAC3F,OAAO,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1D,CAAC;AAED;;;;GAIG;AACH,SAAS,cAAc,CAAC,MAAc;IACpC,0EAA0E;IAC1E,MAAM,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;IACrF,OAAO,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACpD,CAAC;AAED;;;;GAIG;AACH,SAAS,iBAAiB,CAAC,MAAc;IACvC,6EAA6E;IAC7E,MAAM,eAAe,GAAG,MAAM,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;IAC1E,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,eAAe,CAAC,CAAC,CAAC;SACtB,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;SAC1B,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAA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;YAC9B,aAAa;YACb,aAAa;YACb,cAAc;YACd,gBAAgB;YAChB,oBAAoB;YACpB,eAAe;YACf,MAAM;YACN,YAAY;YACZ,aAAa;YACb,SAAS;YACT,QAAQ;SACT,CAAC;QAEF,MAAM,CAAC,KAAK,CAAC,0BAA0B,aAAa,EAAE,EAAE;YACtD,aAAa;YACb,cAAc,EAAE,CAAC,CAAC,cAAc;YAChC,gBAAgB,EAAE,CAAC,CAAC,gBAAgB;YACpC,oBAAoB,EAAE,oBAAoB,CAAC,MAAM;YACjD,eAAe,EAAE,eAAe,CAAC,MAAM;YACvC,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,YAAY,EAAE,YAAY,CAAC,MAAM;SAClC,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC;IAChB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,YAAY,EAAE,CAAC;YAClC,MAAM,KAAK,CAAC;QACd,CAAC;QAED,MAAM,IAAI,YAAY,CAAC,mCAAmC,aAAa,EAAE,EAAE;YACzE,QAAQ,EAAE,aAAa;YACvB,aAAa,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;SACtE,CAAC,CAAC;IACL,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bot Parser
|
|
3
|
+
* Parses Salesforce Einstein Bot metadata files (.bot-meta.xml)
|
|
4
|
+
*
|
|
5
|
+
* @ac US-024-AC-1: Extract dialog references
|
|
6
|
+
* @ac US-024-AC-2: Extract GenAI prompt references
|
|
7
|
+
* @ac US-024-AC-3: Extract Flow references
|
|
8
|
+
* @ac US-024-AC-4: Extract Apex action references
|
|
9
|
+
* @ac US-024-AC-5: Extract menu item references
|
|
10
|
+
* @ac US-024-AC-6: Link to all dependencies
|
|
11
|
+
*
|
|
12
|
+
* @issue #24
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Result of parsing a Bot file
|
|
16
|
+
*/
|
|
17
|
+
export type BotParseResult = {
|
|
18
|
+
/** Name of the bot (from filename) */
|
|
19
|
+
name: string;
|
|
20
|
+
/** Label */
|
|
21
|
+
label: string;
|
|
22
|
+
/** Description */
|
|
23
|
+
description?: string;
|
|
24
|
+
/** Dialog references */
|
|
25
|
+
dialogs: string[];
|
|
26
|
+
/** GenAI prompt references */
|
|
27
|
+
genAiPrompts: string[];
|
|
28
|
+
/** Flow references */
|
|
29
|
+
flows: string[];
|
|
30
|
+
/** Apex action references */
|
|
31
|
+
apexActions: string[];
|
|
32
|
+
/** Menu items (dialogs in footer menu) */
|
|
33
|
+
menuItems: string[];
|
|
34
|
+
/** ML Intents */
|
|
35
|
+
mlIntents: string[];
|
|
36
|
+
/** SObjects referenced */
|
|
37
|
+
sobjects: string[];
|
|
38
|
+
/** All dependencies extracted from this bot */
|
|
39
|
+
dependencies: {
|
|
40
|
+
dialogs: string[];
|
|
41
|
+
genAiPrompts: string[];
|
|
42
|
+
flows: string[];
|
|
43
|
+
apexActions: string[];
|
|
44
|
+
menuItems: string[];
|
|
45
|
+
mlIntents: string[];
|
|
46
|
+
sobjects: string[];
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Parse a Bot metadata XML file
|
|
51
|
+
*
|
|
52
|
+
* @param filePath - Path to the .bot-meta.xml file
|
|
53
|
+
* @param botName - Name of the bot (typically from filename)
|
|
54
|
+
* @returns Parsed bot metadata with dependencies
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* const result = await parseBot(
|
|
58
|
+
* 'force-app/main/default/bots/Support_Bot.bot-meta.xml',
|
|
59
|
+
* 'Support_Bot'
|
|
60
|
+
* );
|
|
61
|
+
* console.log(result.dialogs); // ['Greeting', 'CaseCreation', 'FAQ']
|
|
62
|
+
* console.log(result.flows); // ['Case_Assignment_Flow']
|
|
63
|
+
* console.log(result.genAiPrompts); // ['SummarizeCase']
|
|
64
|
+
*/
|
|
65
|
+
export declare function parseBot(filePath: string, botName: string): Promise<BotParseResult>;
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bot Parser
|
|
3
|
+
* Parses Salesforce Einstein Bot metadata files (.bot-meta.xml)
|
|
4
|
+
*
|
|
5
|
+
* @ac US-024-AC-1: Extract dialog references
|
|
6
|
+
* @ac US-024-AC-2: Extract GenAI prompt references
|
|
7
|
+
* @ac US-024-AC-3: Extract Flow references
|
|
8
|
+
* @ac US-024-AC-4: Extract Apex action references
|
|
9
|
+
* @ac US-024-AC-5: Extract menu item references
|
|
10
|
+
* @ac US-024-AC-6: Link to all dependencies
|
|
11
|
+
*
|
|
12
|
+
* @issue #24
|
|
13
|
+
*/
|
|
14
|
+
import { readFile } from 'node:fs/promises';
|
|
15
|
+
import { XMLParser } from 'fast-xml-parser';
|
|
16
|
+
/**
|
|
17
|
+
* Normalize value to array (handles XML parser returning single object vs array)
|
|
18
|
+
*/
|
|
19
|
+
function normalizeArray(value) {
|
|
20
|
+
if (!value)
|
|
21
|
+
return [];
|
|
22
|
+
return Array.isArray(value) ? value : [value];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Extract invocations from bot steps recursively
|
|
26
|
+
*/
|
|
27
|
+
function extractInvocationsFromSteps(steps) {
|
|
28
|
+
const flows = [];
|
|
29
|
+
const apexActions = [];
|
|
30
|
+
const genAiPrompts = [];
|
|
31
|
+
for (const step of steps) {
|
|
32
|
+
// Extract from botInvocation
|
|
33
|
+
if (step.botInvocation) {
|
|
34
|
+
const invocation = step.botInvocation;
|
|
35
|
+
if (invocation.invocationActionName) {
|
|
36
|
+
switch (invocation.invocationActionType) {
|
|
37
|
+
case 'flow':
|
|
38
|
+
flows.push(invocation.invocationActionName);
|
|
39
|
+
break;
|
|
40
|
+
case 'apex':
|
|
41
|
+
apexActions.push(invocation.invocationActionName);
|
|
42
|
+
break;
|
|
43
|
+
case 'prompt':
|
|
44
|
+
genAiPrompts.push(invocation.invocationActionName);
|
|
45
|
+
break;
|
|
46
|
+
case 'externalService':
|
|
47
|
+
case 'standardInvocableAction':
|
|
48
|
+
case undefined:
|
|
49
|
+
// These types don't need specific tracking
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
// Extract from botVariableOperation.botInvocation
|
|
55
|
+
if (step.botVariableOperation?.botInvocation) {
|
|
56
|
+
const invocation = step.botVariableOperation.botInvocation;
|
|
57
|
+
if (invocation.invocationActionName) {
|
|
58
|
+
switch (invocation.invocationActionType) {
|
|
59
|
+
case 'flow':
|
|
60
|
+
flows.push(invocation.invocationActionName);
|
|
61
|
+
break;
|
|
62
|
+
case 'apex':
|
|
63
|
+
apexActions.push(invocation.invocationActionName);
|
|
64
|
+
break;
|
|
65
|
+
case 'prompt':
|
|
66
|
+
genAiPrompts.push(invocation.invocationActionName);
|
|
67
|
+
break;
|
|
68
|
+
case 'externalService':
|
|
69
|
+
case 'standardInvocableAction':
|
|
70
|
+
case undefined:
|
|
71
|
+
// These types don't need specific tracking
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
// Recursively extract from nested steps
|
|
77
|
+
if (step.botSteps) {
|
|
78
|
+
const nested = extractInvocationsFromSteps(normalizeArray(step.botSteps));
|
|
79
|
+
flows.push(...nested.flows);
|
|
80
|
+
apexActions.push(...nested.apexActions);
|
|
81
|
+
genAiPrompts.push(...nested.genAiPrompts);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return { flows, apexActions, genAiPrompts };
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Extract SObjects from conversation record lookups in bot steps
|
|
88
|
+
*/
|
|
89
|
+
function extractSObjectsFromSteps(steps) {
|
|
90
|
+
const sobjects = [];
|
|
91
|
+
for (const step of steps) {
|
|
92
|
+
// Extract from conversationRecordLookup
|
|
93
|
+
if (step.conversationRecordLookup) {
|
|
94
|
+
sobjects.push(step.conversationRecordLookup.SObjectType);
|
|
95
|
+
}
|
|
96
|
+
// Recursively extract from nested steps
|
|
97
|
+
if (step.botSteps) {
|
|
98
|
+
sobjects.push(...extractSObjectsFromSteps(normalizeArray(step.botSteps)));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return sobjects;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Extract all references from bot dialogs
|
|
105
|
+
*/
|
|
106
|
+
function extractReferencesFromDialogs(dialogs) {
|
|
107
|
+
const allFlows = [];
|
|
108
|
+
const allApexActions = [];
|
|
109
|
+
const allGenAiPrompts = [];
|
|
110
|
+
const allSObjects = [];
|
|
111
|
+
for (const dialog of dialogs) {
|
|
112
|
+
const steps = normalizeArray(dialog.botSteps);
|
|
113
|
+
// Extract invocations
|
|
114
|
+
const { flows, apexActions, genAiPrompts } = extractInvocationsFromSteps(steps);
|
|
115
|
+
allFlows.push(...flows);
|
|
116
|
+
allApexActions.push(...apexActions);
|
|
117
|
+
allGenAiPrompts.push(...genAiPrompts);
|
|
118
|
+
// Extract SObjects
|
|
119
|
+
const sobjects = extractSObjectsFromSteps(steps);
|
|
120
|
+
allSObjects.push(...sobjects);
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
flows: [...new Set(allFlows)],
|
|
124
|
+
apexActions: [...new Set(allApexActions)],
|
|
125
|
+
genAiPrompts: [...new Set(allGenAiPrompts)],
|
|
126
|
+
sobjects: [...new Set(allSObjects)],
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Parse a Bot metadata XML file
|
|
131
|
+
*
|
|
132
|
+
* @param filePath - Path to the .bot-meta.xml file
|
|
133
|
+
* @param botName - Name of the bot (typically from filename)
|
|
134
|
+
* @returns Parsed bot metadata with dependencies
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* const result = await parseBot(
|
|
138
|
+
* 'force-app/main/default/bots/Support_Bot.bot-meta.xml',
|
|
139
|
+
* 'Support_Bot'
|
|
140
|
+
* );
|
|
141
|
+
* console.log(result.dialogs); // ['Greeting', 'CaseCreation', 'FAQ']
|
|
142
|
+
* console.log(result.flows); // ['Case_Assignment_Flow']
|
|
143
|
+
* console.log(result.genAiPrompts); // ['SummarizeCase']
|
|
144
|
+
*/
|
|
145
|
+
export async function parseBot(filePath, botName) {
|
|
146
|
+
// Read and parse XML
|
|
147
|
+
const xmlContent = await readFile(filePath, 'utf-8');
|
|
148
|
+
const parser = new XMLParser({
|
|
149
|
+
ignoreAttributes: false,
|
|
150
|
+
parseAttributeValue: true,
|
|
151
|
+
trimValues: true,
|
|
152
|
+
});
|
|
153
|
+
let parsed;
|
|
154
|
+
try {
|
|
155
|
+
parsed = parser.parse(xmlContent);
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
throw new Error(`Failed to parse Bot XML at ${filePath}: ${error instanceof Error ? error.message : String(error)}`);
|
|
159
|
+
}
|
|
160
|
+
// Type assertion with validation
|
|
161
|
+
const root = parsed;
|
|
162
|
+
if (!root.Bot) {
|
|
163
|
+
throw new Error(`Invalid Bot XML structure at ${filePath}: missing Bot root element`);
|
|
164
|
+
}
|
|
165
|
+
const metadata = root.Bot;
|
|
166
|
+
// Extract bot versions and dialogs
|
|
167
|
+
const botVersions = normalizeArray(metadata.botVersions);
|
|
168
|
+
const allDialogs = [];
|
|
169
|
+
for (const version of botVersions) {
|
|
170
|
+
const versionDialogs = normalizeArray(version.botDialogs);
|
|
171
|
+
allDialogs.push(...versionDialogs);
|
|
172
|
+
}
|
|
173
|
+
// Extract dialog names
|
|
174
|
+
const dialogNames = allDialogs.map((dialog) => dialog.developerName);
|
|
175
|
+
// Extract menu items (dialogs shown in footer menu)
|
|
176
|
+
const menuItems = allDialogs
|
|
177
|
+
.filter((dialog) => dialog.showInFooterMenu === true)
|
|
178
|
+
.map((dialog) => dialog.developerName);
|
|
179
|
+
// Extract ML Intents
|
|
180
|
+
const mlIntents = normalizeArray(metadata.mlIntents).map((intent) => intent.developerName);
|
|
181
|
+
// Extract invocations and SObjects from all dialogs
|
|
182
|
+
const { flows, apexActions, genAiPrompts, sobjects } = extractReferencesFromDialogs(allDialogs);
|
|
183
|
+
// Extract SObjects from conversation variables
|
|
184
|
+
const variableSObjects = [];
|
|
185
|
+
for (const version of botVersions) {
|
|
186
|
+
const variables = normalizeArray(version.conversationVariables);
|
|
187
|
+
for (const variable of variables) {
|
|
188
|
+
if (variable.SObjectType) {
|
|
189
|
+
variableSObjects.push(variable.SObjectType);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
// Extract SObjects from context variables
|
|
194
|
+
const contextVariables = normalizeArray(metadata.contextVariables);
|
|
195
|
+
for (const variable of contextVariables) {
|
|
196
|
+
if (variable.SObjectType) {
|
|
197
|
+
variableSObjects.push(variable.SObjectType);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
// Combine and deduplicate SObjects
|
|
201
|
+
const allSObjects = [...new Set([...sobjects, ...variableSObjects])];
|
|
202
|
+
// Build result
|
|
203
|
+
return {
|
|
204
|
+
name: botName,
|
|
205
|
+
label: metadata.label,
|
|
206
|
+
description: metadata.description,
|
|
207
|
+
dialogs: dialogNames,
|
|
208
|
+
genAiPrompts,
|
|
209
|
+
flows,
|
|
210
|
+
apexActions,
|
|
211
|
+
menuItems,
|
|
212
|
+
mlIntents,
|
|
213
|
+
sobjects: allSObjects,
|
|
214
|
+
dependencies: {
|
|
215
|
+
dialogs: dialogNames,
|
|
216
|
+
genAiPrompts,
|
|
217
|
+
flows,
|
|
218
|
+
apexActions,
|
|
219
|
+
menuItems,
|
|
220
|
+
mlIntents,
|
|
221
|
+
sobjects: allSObjects,
|
|
222
|
+
},
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
//# sourceMappingURL=bot-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+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