@peernova/cuneiform-sf 1.0.2 → 1.0.4-beta.10
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/LICENSE +81 -30
- package/README.md +168 -134
- package/lib/adapters/connection-facade.d.ts +458 -0
- package/lib/adapters/connection-facade.js +379 -0
- package/lib/adapters/connection-facade.js.map +1 -0
- package/lib/adapters/errors.d.ts +547 -0
- package/lib/adapters/errors.js +937 -0
- package/lib/adapters/errors.js.map +1 -0
- package/lib/adapters/lifecycle.d.ts +112 -0
- package/lib/adapters/lifecycle.js +94 -0
- package/lib/adapters/lifecycle.js.map +1 -0
- package/lib/adapters/rest/cache.d.ts +69 -0
- package/lib/adapters/rest/cache.js +133 -0
- package/lib/adapters/rest/cache.js.map +1 -0
- package/lib/adapters/rest/index.d.ts +11 -0
- package/lib/adapters/rest/index.js +18 -0
- package/lib/adapters/rest/index.js.map +1 -0
- package/lib/adapters/rest/profiling-rest-client.d.ts +137 -0
- package/lib/adapters/rest/profiling-rest-client.js +115 -0
- package/lib/adapters/rest/profiling-rest-client.js.map +1 -0
- package/lib/adapters/rest/rest-api-adapter.d.ts +393 -0
- package/lib/adapters/rest/rest-api-adapter.js +764 -0
- package/lib/adapters/rest/rest-api-adapter.js.map +1 -0
- package/lib/adapters/rest/types.d.ts +34 -0
- package/lib/adapters/rest/types.js +9 -0
- package/lib/adapters/rest/types.js.map +1 -0
- package/lib/adapters/retry.d.ts +91 -0
- package/lib/adapters/retry.js +215 -0
- package/lib/adapters/retry.js.map +1 -0
- package/lib/adapters/soql/cuneiform-query-builder.d.ts +418 -0
- package/lib/adapters/soql/cuneiform-query-builder.js +606 -0
- package/lib/adapters/soql/cuneiform-query-builder.js.map +1 -0
- package/lib/adapters/soql/soql-query-adapter.d.ts +141 -0
- package/lib/adapters/soql/soql-query-adapter.js +259 -0
- package/lib/adapters/soql/soql-query-adapter.js.map +1 -0
- package/lib/adapters/soql/types.d.ts +37 -0
- package/lib/adapters/soql/types.js +19 -0
- package/lib/adapters/soql/types.js.map +1 -0
- package/lib/adapters/testing/index.d.ts +37 -0
- package/lib/adapters/testing/index.js +20 -0
- package/lib/adapters/testing/index.js.map +1 -0
- package/lib/adapters/testing/mock-connection.d.ts +77 -0
- package/lib/adapters/testing/mock-connection.js +207 -0
- package/lib/adapters/testing/mock-connection.js.map +1 -0
- package/lib/adapters/testing/mock-logger.d.ts +29 -0
- package/lib/adapters/testing/mock-logger.js +57 -0
- package/lib/adapters/testing/mock-logger.js.map +1 -0
- package/lib/adapters/testing/mock-mcp-adapters.d.ts +32 -0
- package/lib/adapters/testing/mock-mcp-adapters.js +52 -0
- package/lib/adapters/testing/mock-mcp-adapters.js.map +1 -0
- package/lib/adapters/testing/mock-oclif-config.d.ts +22 -0
- package/lib/adapters/testing/mock-oclif-config.js +90 -0
- package/lib/adapters/testing/mock-oclif-config.js.map +1 -0
- package/lib/adapters/testing/mock-rest-adapter.d.ts +26 -0
- package/lib/adapters/testing/mock-rest-adapter.js +243 -0
- package/lib/adapters/testing/mock-rest-adapter.js.map +1 -0
- package/lib/adapters/testing/mock-salesforce-connection.d.ts +40 -0
- package/lib/adapters/testing/mock-salesforce-connection.js +61 -0
- package/lib/adapters/testing/mock-salesforce-connection.js.map +1 -0
- package/lib/adapters/testing/mock-soql-adapter.d.ts +30 -0
- package/lib/adapters/testing/mock-soql-adapter.js +120 -0
- package/lib/adapters/testing/mock-soql-adapter.js.map +1 -0
- package/lib/adapters/testing/mock-tooling-adapter.d.ts +24 -0
- package/lib/adapters/testing/mock-tooling-adapter.js +163 -0
- package/lib/adapters/testing/mock-tooling-adapter.js.map +1 -0
- package/lib/adapters/testing/stub-connection.d.ts +93 -0
- package/lib/adapters/testing/stub-connection.js +97 -0
- package/lib/adapters/testing/stub-connection.js.map +1 -0
- package/lib/adapters/testing/stub-rest-adapter.d.ts +52 -0
- package/lib/adapters/testing/stub-rest-adapter.js +58 -0
- package/lib/adapters/testing/stub-rest-adapter.js.map +1 -0
- package/lib/adapters/testing/stub-soql-adapter.d.ts +56 -0
- package/lib/adapters/testing/stub-soql-adapter.js +50 -0
- package/lib/adapters/testing/stub-soql-adapter.js.map +1 -0
- package/lib/adapters/testing/types.d.ts +71 -0
- package/lib/adapters/testing/types.js +9 -0
- package/lib/adapters/testing/types.js.map +1 -0
- package/lib/adapters/tooling/index.d.ts +10 -0
- package/lib/adapters/tooling/index.js +17 -0
- package/lib/adapters/tooling/index.js.map +1 -0
- package/lib/adapters/tooling/tooling-api-adapter.d.ts +157 -0
- package/lib/adapters/tooling/tooling-api-adapter.js +339 -0
- package/lib/adapters/tooling/tooling-api-adapter.js.map +1 -0
- package/lib/adapters/tooling/types.d.ts +81 -0
- package/lib/adapters/tooling/types.js +9 -0
- package/lib/adapters/tooling/types.js.map +1 -0
- package/lib/adapters/types.d.ts +112 -0
- package/lib/adapters/types.js +169 -0
- package/lib/adapters/types.js.map +1 -0
- package/lib/base/cuneiform-command.d.ts +175 -0
- package/lib/base/cuneiform-command.js +326 -0
- package/lib/base/cuneiform-command.js.map +1 -0
- package/lib/commands/cuneiform/compatibility/check.d.ts +43 -0
- package/lib/commands/cuneiform/compatibility/check.js +114 -0
- package/lib/commands/cuneiform/compatibility/check.js.map +1 -0
- package/lib/commands/cuneiform/definition/create.d.ts +120 -0
- package/lib/commands/cuneiform/definition/create.js +737 -0
- package/lib/commands/cuneiform/definition/create.js.map +1 -0
- package/lib/commands/cuneiform/definition/export.d.ts +57 -0
- package/lib/commands/cuneiform/definition/export.js +133 -0
- package/lib/commands/cuneiform/definition/export.js.map +1 -0
- package/lib/commands/cuneiform/definition/get.d.ts +86 -0
- package/lib/commands/cuneiform/definition/get.js +277 -0
- package/lib/commands/cuneiform/definition/get.js.map +1 -0
- package/lib/commands/cuneiform/definition/import.d.ts +54 -0
- package/lib/commands/cuneiform/definition/import.js +118 -0
- package/lib/commands/cuneiform/definition/import.js.map +1 -0
- package/lib/commands/cuneiform/definition/list.d.ts +110 -0
- package/lib/commands/cuneiform/definition/list.js +351 -0
- package/lib/commands/cuneiform/definition/list.js.map +1 -0
- package/lib/commands/cuneiform/definition/purge.d.ts +109 -0
- package/lib/commands/cuneiform/definition/purge.js +578 -0
- package/lib/commands/cuneiform/definition/purge.js.map +1 -0
- package/lib/commands/cuneiform/definition/update.d.ts +58 -0
- package/lib/commands/cuneiform/definition/update.js +209 -0
- package/lib/commands/cuneiform/definition/update.js.map +1 -0
- package/lib/commands/cuneiform/mcp/serve.d.ts +56 -0
- package/lib/commands/cuneiform/mcp/serve.js +109 -0
- package/lib/commands/cuneiform/mcp/serve.js.map +1 -0
- package/lib/commands/cuneiform/object/describe.d.ts +61 -0
- package/lib/commands/cuneiform/object/describe.js +461 -0
- package/lib/commands/cuneiform/object/describe.js.map +1 -0
- package/lib/commands/cuneiform/object/list.d.ts +123 -0
- package/lib/commands/cuneiform/object/list.js +264 -0
- package/lib/commands/cuneiform/object/list.js.map +1 -0
- package/lib/commands/cuneiform/org/details.d.ts +99 -0
- package/lib/commands/cuneiform/org/details.js +521 -0
- package/lib/commands/cuneiform/org/details.js.map +1 -0
- package/lib/commands/cuneiform/org/reset.d.ts +46 -0
- package/lib/commands/cuneiform/org/reset.js +135 -0
- package/lib/commands/cuneiform/org/reset.js.map +1 -0
- package/lib/commands/cuneiform/profile/request/cancel.d.ts +59 -0
- package/lib/commands/cuneiform/profile/request/cancel.js +202 -0
- package/lib/commands/cuneiform/profile/request/cancel.js.map +1 -0
- package/lib/commands/cuneiform/profile/request/delete.d.ts +59 -0
- package/lib/commands/cuneiform/profile/request/delete.js +223 -0
- package/lib/commands/cuneiform/profile/request/delete.js.map +1 -0
- package/lib/commands/cuneiform/profile/request/list.d.ts +35 -0
- package/lib/commands/cuneiform/profile/request/list.js +102 -0
- package/lib/commands/cuneiform/profile/request/list.js.map +1 -0
- package/lib/commands/cuneiform/profile.d.ts +93 -0
- package/lib/commands/cuneiform/profile.js +353 -0
- package/lib/commands/cuneiform/profile.js.map +1 -0
- package/lib/commands/cuneiform/summary/purge.d.ts +80 -0
- package/lib/commands/cuneiform/summary/purge.js +467 -0
- package/lib/commands/cuneiform/summary/purge.js.map +1 -0
- package/lib/commands/cuneiform/summary/reprofile.d.ts +60 -0
- package/lib/commands/cuneiform/summary/reprofile.js +236 -0
- package/lib/commands/cuneiform/summary/reprofile.js.map +1 -0
- package/lib/commands/cuneiform/summary/stop.d.ts +59 -0
- package/lib/commands/cuneiform/summary/stop.js +234 -0
- package/lib/commands/cuneiform/summary/stop.js.map +1 -0
- package/lib/commands/cuneiform/user/details.d.ts +77 -0
- package/lib/commands/cuneiform/user/details.js +414 -0
- package/lib/commands/cuneiform/user/details.js.map +1 -0
- package/lib/constants/namespace-constants.d.ts +102 -0
- package/lib/constants/namespace-constants.js +225 -0
- package/lib/constants/namespace-constants.js.map +1 -0
- package/lib/debug/command-debug-proxy.d.ts +101 -0
- package/lib/debug/command-debug-proxy.js +171 -0
- package/lib/debug/command-debug-proxy.js.map +1 -0
- package/lib/debug/debug-logger.d.ts +85 -0
- package/lib/debug/debug-logger.js +133 -0
- package/lib/debug/debug-logger.js.map +1 -0
- package/lib/debug/service-debug-proxy.d.ts +30 -0
- package/lib/debug/service-debug-proxy.js +102 -0
- package/lib/debug/service-debug-proxy.js.map +1 -0
- package/lib/hooks/prerun.d.ts +25 -0
- package/lib/hooks/prerun.js +47 -0
- package/lib/hooks/prerun.js.map +1 -0
- package/lib/mcp/config/mcp-config.d.ts +55 -0
- package/lib/mcp/config/mcp-config.js +51 -0
- package/lib/mcp/config/mcp-config.js.map +1 -0
- package/lib/mcp/config/pagination.d.ts +96 -0
- package/lib/mcp/config/pagination.js +108 -0
- package/lib/mcp/config/pagination.js.map +1 -0
- package/lib/mcp/config/system-prompts.d.ts +18 -0
- package/lib/mcp/config/system-prompts.js +92 -0
- package/lib/mcp/config/system-prompts.js.map +1 -0
- package/lib/mcp/errors.d.ts +23 -0
- package/lib/mcp/errors.js +27 -0
- package/lib/mcp/errors.js.map +1 -0
- package/lib/mcp/schemas/input-schemas.d.ts +327 -0
- package/lib/mcp/schemas/input-schemas.js +310 -0
- package/lib/mcp/schemas/input-schemas.js.map +1 -0
- package/lib/mcp/server.d.ts +40 -0
- package/lib/mcp/server.js +316 -0
- package/lib/mcp/server.js.map +1 -0
- package/lib/mcp/tools/contactpoint-tools.d.ts +14 -0
- package/lib/mcp/tools/contactpoint-tools.js +34 -0
- package/lib/mcp/tools/contactpoint-tools.js.map +1 -0
- package/lib/mcp/tools/definition-io-tools.d.ts +19 -0
- package/lib/mcp/tools/definition-io-tools.js +152 -0
- package/lib/mcp/tools/definition-io-tools.js.map +1 -0
- package/lib/mcp/tools/definition-tools.d.ts +51 -0
- package/lib/mcp/tools/definition-tools.js +220 -0
- package/lib/mcp/tools/definition-tools.js.map +1 -0
- package/lib/mcp/tools/index.d.ts +37 -0
- package/lib/mcp/tools/index.js +88 -0
- package/lib/mcp/tools/index.js.map +1 -0
- package/lib/mcp/tools/object-tools.d.ts +22 -0
- package/lib/mcp/tools/object-tools.js +327 -0
- package/lib/mcp/tools/object-tools.js.map +1 -0
- package/lib/mcp/tools/org-tools.d.ts +14 -0
- package/lib/mcp/tools/org-tools.js +177 -0
- package/lib/mcp/tools/org-tools.js.map +1 -0
- package/lib/mcp/tools/profile-tools.d.ts +59 -0
- package/lib/mcp/tools/profile-tools.js +213 -0
- package/lib/mcp/tools/profile-tools.js.map +1 -0
- package/lib/mcp/tools/summary-tools.d.ts +14 -0
- package/lib/mcp/tools/summary-tools.js +38 -0
- package/lib/mcp/tools/summary-tools.js.map +1 -0
- package/lib/mcp/tools/tool-factory.d.ts +63 -0
- package/lib/mcp/tools/tool-factory.js +146 -0
- package/lib/mcp/tools/tool-factory.js.map +1 -0
- package/lib/mcp/tools/user-tools.d.ts +25 -0
- package/lib/mcp/tools/user-tools.js +167 -0
- package/lib/mcp/tools/user-tools.js.map +1 -0
- package/lib/models/cascade-skip-accumulator.d.ts +25 -0
- package/lib/models/cascade-skip-accumulator.js +9 -0
- package/lib/models/cascade-skip-accumulator.js.map +1 -0
- package/lib/models/date-literal.d.ts +280 -0
- package/lib/models/date-literal.js +1164 -0
- package/lib/models/date-literal.js.map +1 -0
- package/lib/models/object-describe-types.d.ts +173 -0
- package/lib/models/object-describe-types.js +9 -0
- package/lib/models/object-describe-types.js.map +1 -0
- package/lib/models/portability-recipe.d.ts +35 -0
- package/lib/models/portability-recipe.js +113 -0
- package/lib/models/portability-recipe.js.map +1 -0
- package/lib/models/profile-request-types.d.ts +118 -0
- package/lib/models/profile-request-types.js +23 -0
- package/lib/models/profile-request-types.js.map +1 -0
- package/lib/models/profiling-execution-types.d.ts +154 -0
- package/lib/models/profiling-execution-types.js +14 -0
- package/lib/models/profiling-execution-types.js.map +1 -0
- package/lib/models/service-result.d.ts +114 -0
- package/lib/models/service-result.js +81 -0
- package/lib/models/service-result.js.map +1 -0
- package/lib/models/sfdmu-types.d.ts +49 -0
- package/lib/models/sfdmu-types.js +23 -0
- package/lib/models/sfdmu-types.js.map +1 -0
- package/lib/models/status-types.d.ts +38 -0
- package/lib/models/status-types.js +12 -0
- package/lib/models/status-types.js.map +1 -0
- package/lib/models/summary-bulk-types.d.ts +61 -0
- package/lib/models/summary-bulk-types.js +23 -0
- package/lib/models/summary-bulk-types.js.map +1 -0
- package/lib/models/user-details-types.d.ts +188 -0
- package/lib/models/user-details-types.js +9 -0
- package/lib/models/user-details-types.js.map +1 -0
- package/lib/models/year-range.d.ts +78 -0
- package/lib/models/year-range.js +153 -0
- package/lib/models/year-range.js.map +1 -0
- package/lib/operations/CompatibilityCheckOperation.d.ts +62 -0
- package/lib/operations/CompatibilityCheckOperation.js +102 -0
- package/lib/operations/CompatibilityCheckOperation.js.map +1 -0
- package/lib/operations/DefinitionCreateOperation.d.ts +427 -0
- package/lib/operations/DefinitionCreateOperation.js +1270 -0
- package/lib/operations/DefinitionCreateOperation.js.map +1 -0
- package/lib/operations/DefinitionExportOperation.d.ts +155 -0
- package/lib/operations/DefinitionExportOperation.js +281 -0
- package/lib/operations/DefinitionExportOperation.js.map +1 -0
- package/lib/operations/DefinitionImportOperation.d.ts +144 -0
- package/lib/operations/DefinitionImportOperation.js +357 -0
- package/lib/operations/DefinitionImportOperation.js.map +1 -0
- package/lib/operations/DefinitionListOperation.d.ts +66 -0
- package/lib/operations/DefinitionListOperation.js +108 -0
- package/lib/operations/DefinitionListOperation.js.map +1 -0
- package/lib/operations/DefinitionPurgeOperation.d.ts +203 -0
- package/lib/operations/DefinitionPurgeOperation.js +465 -0
- package/lib/operations/DefinitionPurgeOperation.js.map +1 -0
- package/lib/operations/DefinitionUpdateOperation.d.ts +78 -0
- package/lib/operations/DefinitionUpdateOperation.js +142 -0
- package/lib/operations/DefinitionUpdateOperation.js.map +1 -0
- package/lib/operations/OrgDetailsOperation.d.ts +253 -0
- package/lib/operations/OrgDetailsOperation.js +456 -0
- package/lib/operations/OrgDetailsOperation.js.map +1 -0
- package/lib/operations/OrgResetOperation.d.ts +114 -0
- package/lib/operations/OrgResetOperation.js +209 -0
- package/lib/operations/OrgResetOperation.js.map +1 -0
- package/lib/operations/ProfileOperation.d.ts +192 -0
- package/lib/operations/ProfileOperation.js +371 -0
- package/lib/operations/ProfileOperation.js.map +1 -0
- package/lib/operations/ProfileRequestCancelOperation.d.ts +59 -0
- package/lib/operations/ProfileRequestCancelOperation.js +137 -0
- package/lib/operations/ProfileRequestCancelOperation.js.map +1 -0
- package/lib/operations/ProfileRequestDeleteOperation.d.ts +64 -0
- package/lib/operations/ProfileRequestDeleteOperation.js +134 -0
- package/lib/operations/ProfileRequestDeleteOperation.js.map +1 -0
- package/lib/operations/ProfileRequestListOperation.d.ts +39 -0
- package/lib/operations/ProfileRequestListOperation.js +61 -0
- package/lib/operations/ProfileRequestListOperation.js.map +1 -0
- package/lib/operations/SummaryPurgeOperation.d.ts +134 -0
- package/lib/operations/SummaryPurgeOperation.js +257 -0
- package/lib/operations/SummaryPurgeOperation.js.map +1 -0
- package/lib/operations/SummaryReprofileOperation.d.ts +88 -0
- package/lib/operations/SummaryReprofileOperation.js +174 -0
- package/lib/operations/SummaryReprofileOperation.js.map +1 -0
- package/lib/operations/SummaryStopOperation.d.ts +87 -0
- package/lib/operations/SummaryStopOperation.js +175 -0
- package/lib/operations/SummaryStopOperation.js.map +1 -0
- package/lib/services/BulkExecutionService.d.ts +120 -0
- package/lib/services/BulkExecutionService.js +535 -0
- package/lib/services/BulkExecutionService.js.map +1 -0
- package/lib/services/CompatibilityService.d.ts +81 -0
- package/lib/services/CompatibilityService.js +118 -0
- package/lib/services/CompatibilityService.js.map +1 -0
- package/lib/services/ConfigureMode.d.ts +98 -0
- package/lib/services/ConfigureMode.js +413 -0
- package/lib/services/ConfigureMode.js.map +1 -0
- package/lib/services/ContactPointService.d.ts +111 -0
- package/lib/services/ContactPointService.js +286 -0
- package/lib/services/ContactPointService.js.map +1 -0
- package/lib/services/DataAvailabilityService.d.ts +81 -0
- package/lib/services/DataAvailabilityService.js +128 -0
- package/lib/services/DataAvailabilityService.js.map +1 -0
- package/lib/services/DefinitionFieldGenerationService.d.ts +357 -0
- package/lib/services/DefinitionFieldGenerationService.js +899 -0
- package/lib/services/DefinitionFieldGenerationService.js.map +1 -0
- package/lib/services/DefinitionQueryBuilder.d.ts +92 -0
- package/lib/services/DefinitionQueryBuilder.js +328 -0
- package/lib/services/DefinitionQueryBuilder.js.map +1 -0
- package/lib/services/ObjectDescribeService.d.ts +436 -0
- package/lib/services/ObjectDescribeService.js +881 -0
- package/lib/services/ObjectDescribeService.js.map +1 -0
- package/lib/services/ObjectFilteringService.d.ts +484 -0
- package/lib/services/ObjectFilteringService.js +1080 -0
- package/lib/services/ObjectFilteringService.js.map +1 -0
- package/lib/services/ObjectListCommandService.d.ts +467 -0
- package/lib/services/ObjectListCommandService.js +904 -0
- package/lib/services/ObjectListCommandService.js.map +1 -0
- package/lib/services/ObjectListService.d.ts +201 -0
- package/lib/services/ObjectListService.js +350 -0
- package/lib/services/ObjectListService.js.map +1 -0
- package/lib/services/OrgInfoService.d.ts +493 -0
- package/lib/services/OrgInfoService.js +1142 -0
- package/lib/services/OrgInfoService.js.map +1 -0
- package/lib/services/PollingService.d.ts +105 -0
- package/lib/services/PollingService.js +117 -0
- package/lib/services/PollingService.js.map +1 -0
- package/lib/services/ProfileRequestService.d.ts +186 -0
- package/lib/services/ProfileRequestService.js +555 -0
- package/lib/services/ProfileRequestService.js.map +1 -0
- package/lib/services/ProfilingDefinitionService.d.ts +575 -0
- package/lib/services/ProfilingDefinitionService.js +1029 -0
- package/lib/services/ProfilingDefinitionService.js.map +1 -0
- package/lib/services/ProfilingExecutionService.d.ts +122 -0
- package/lib/services/ProfilingExecutionService.js +320 -0
- package/lib/services/ProfilingExecutionService.js.map +1 -0
- package/lib/services/ProfilingSummaryService.d.ts +292 -0
- package/lib/services/ProfilingSummaryService.js +688 -0
- package/lib/services/ProfilingSummaryService.js.map +1 -0
- package/lib/services/RecordTypeService.d.ts +129 -0
- package/lib/services/RecordTypeService.js +284 -0
- package/lib/services/RecordTypeService.js.map +1 -0
- package/lib/services/SFDMUService.d.ts +146 -0
- package/lib/services/SFDMUService.js +323 -0
- package/lib/services/SFDMUService.js.map +1 -0
- package/lib/services/TabDetectionService.d.ts +105 -0
- package/lib/services/TabDetectionService.js +206 -0
- package/lib/services/TabDetectionService.js.map +1 -0
- package/lib/services/UnconfigureMode.d.ts +74 -0
- package/lib/services/UnconfigureMode.js +378 -0
- package/lib/services/UnconfigureMode.js.map +1 -0
- package/lib/services/UserConfigurationService.d.ts +158 -0
- package/lib/services/UserConfigurationService.js +574 -0
- package/lib/services/UserConfigurationService.js.map +1 -0
- package/lib/services/UserConfigurationTypes.d.ts +181 -0
- package/lib/services/UserConfigurationTypes.js +14 -0
- package/lib/services/UserConfigurationTypes.js.map +1 -0
- package/lib/services/UserReadinessService.d.ts +347 -0
- package/lib/services/UserReadinessService.js +891 -0
- package/lib/services/UserReadinessService.js.map +1 -0
- package/lib/services/constants.d.ts +54 -0
- package/lib/services/constants.js +71 -0
- package/lib/services/constants.js.map +1 -0
- package/lib/services/namespace-constants.d.ts +1 -0
- package/lib/services/namespace-constants.js +11 -0
- package/lib/services/namespace-constants.js.map +1 -0
- package/lib/services/namespace-filter.d.ts +36 -0
- package/lib/services/namespace-filter.js +109 -0
- package/lib/services/namespace-filter.js.map +1 -0
- package/lib/services/validation.d.ts +47 -0
- package/lib/services/validation.js +119 -0
- package/lib/services/validation.js.map +1 -0
- package/lib/utils/batch-processor.d.ts +13 -0
- package/lib/utils/batch-processor.js +39 -0
- package/lib/utils/batch-processor.js.map +1 -0
- package/lib/utils/formatting/availability-grid.d.ts +81 -0
- package/lib/utils/formatting/availability-grid.js +94 -0
- package/lib/utils/formatting/availability-grid.js.map +1 -0
- package/lib/utils/formatting/business-process-grid.d.ts +51 -0
- package/lib/utils/formatting/business-process-grid.js +58 -0
- package/lib/utils/formatting/business-process-grid.js.map +1 -0
- package/lib/utils/formatting/command-display.d.ts +154 -0
- package/lib/utils/formatting/command-display.js +154 -0
- package/lib/utils/formatting/command-display.js.map +1 -0
- package/lib/utils/formatting/definition-create-display.d.ts +118 -0
- package/lib/utils/formatting/definition-create-display.js +230 -0
- package/lib/utils/formatting/definition-create-display.js.map +1 -0
- package/lib/utils/formatting/empty-states.d.ts +35 -0
- package/lib/utils/formatting/empty-states.js +70 -0
- package/lib/utils/formatting/empty-states.js.map +1 -0
- package/lib/utils/formatting/errors.d.ts +33 -0
- package/lib/utils/formatting/errors.js +72 -0
- package/lib/utils/formatting/errors.js.map +1 -0
- package/lib/utils/formatting/field-types.d.ts +32 -0
- package/lib/utils/formatting/field-types.js +88 -0
- package/lib/utils/formatting/field-types.js.map +1 -0
- package/lib/utils/formatting/index.d.ts +29 -0
- package/lib/utils/formatting/index.js +28 -0
- package/lib/utils/formatting/index.js.map +1 -0
- package/lib/utils/formatting/indicators.d.ts +113 -0
- package/lib/utils/formatting/indicators.js +161 -0
- package/lib/utils/formatting/indicators.js.map +1 -0
- package/lib/utils/formatting/loading-messages.d.ts +37 -0
- package/lib/utils/formatting/loading-messages.js +50 -0
- package/lib/utils/formatting/loading-messages.js.map +1 -0
- package/lib/utils/formatting/namespace-display.d.ts +31 -0
- package/lib/utils/formatting/namespace-display.js +64 -0
- package/lib/utils/formatting/namespace-display.js.map +1 -0
- package/lib/utils/formatting/numbers.d.ts +73 -0
- package/lib/utils/formatting/numbers.js +187 -0
- package/lib/utils/formatting/numbers.js.map +1 -0
- package/lib/utils/formatting/object-describe-display.d.ts +117 -0
- package/lib/utils/formatting/object-describe-display.js +447 -0
- package/lib/utils/formatting/object-describe-display.js.map +1 -0
- package/lib/utils/formatting/object-list-display.d.ts +225 -0
- package/lib/utils/formatting/object-list-display.js +718 -0
- package/lib/utils/formatting/object-list-display.js.map +1 -0
- package/lib/utils/formatting/org-identity.d.ts +15 -0
- package/lib/utils/formatting/org-identity.js +28 -0
- package/lib/utils/formatting/org-identity.js.map +1 -0
- package/lib/utils/formatting/record-age-grid.d.ts +41 -0
- package/lib/utils/formatting/record-age-grid.js +56 -0
- package/lib/utils/formatting/record-age-grid.js.map +1 -0
- package/lib/utils/formatting/sections.d.ts +108 -0
- package/lib/utils/formatting/sections.js +150 -0
- package/lib/utils/formatting/sections.js.map +1 -0
- package/lib/utils/formatting/tables.d.ts +90 -0
- package/lib/utils/formatting/tables.js +113 -0
- package/lib/utils/formatting/tables.js.map +1 -0
- package/lib/utils/formatting/user-details-display.d.ts +101 -0
- package/lib/utils/formatting/user-details-display.js +425 -0
- package/lib/utils/formatting/user-details-display.js.map +1 -0
- package/lib/utils/pagination/keypress-reader.d.ts +20 -0
- package/lib/utils/pagination/keypress-reader.js +63 -0
- package/lib/utils/pagination/keypress-reader.js.map +1 -0
- package/lib/utils/pagination/paginate-output.d.ts +48 -0
- package/lib/utils/pagination/paginate-output.js +136 -0
- package/lib/utils/pagination/paginate-output.js.map +1 -0
- package/messages/compatibility.check.md +71 -0
- package/messages/cuneiform.access.md +138 -0
- package/messages/definition.create.md +525 -0
- package/messages/definition.export.md +84 -0
- package/messages/definition.get.md +147 -0
- package/messages/definition.import.md +65 -0
- package/messages/definition.list.md +264 -0
- package/messages/definition.purge.md +330 -0
- package/messages/definition.update.md +118 -0
- package/messages/mcp.serve.md +66 -0
- package/messages/object.describe.md +205 -0
- package/messages/object.list.md +463 -0
- package/messages/org.details.md +386 -0
- package/messages/org.reset.md +71 -0
- package/messages/profile.md +243 -0
- package/messages/profile.request.cancel.md +143 -0
- package/messages/profile.request.delete.md +139 -0
- package/messages/profile.request.list.md +89 -0
- package/messages/summary.purge.md +218 -0
- package/messages/summary.reprofile.md +150 -0
- package/messages/summary.stop.md +157 -0
- package/messages/user.details.md +501 -0
- package/oclif.lock +3267 -2148
- package/oclif.manifest.json +2829 -31
- package/package.json +104 -18
- package/lib/commands/cuneiform/about.d.ts +0 -13
- package/lib/commands/cuneiform/about.js +0 -26
- package/lib/commands/cuneiform/about.js.map +0 -1
- package/lib/commands/hello/world.d.ts +0 -14
- package/lib/commands/hello/world.js +0 -27
- package/lib/commands/hello/world.js.map +0 -1
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -2
- package/lib/index.js.map +0 -1
- package/messages/cuneiform.about.md +0 -19
- package/messages/hello.world.md +0 -29
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { CuneiformCommand } from '../../../base/cuneiform-command.js';
|
|
2
|
+
/**
|
|
3
|
+
* Command result type for JSON output.
|
|
4
|
+
*/
|
|
5
|
+
export type DefinitionUpdateCommandResult = {
|
|
6
|
+
/** Whether the update was successful */
|
|
7
|
+
success: boolean;
|
|
8
|
+
/** The Salesforce record ID of the updated definition */
|
|
9
|
+
definitionId: string;
|
|
10
|
+
/** Whether any attributes were updated */
|
|
11
|
+
updated: boolean;
|
|
12
|
+
/** Names of the attributes that were written */
|
|
13
|
+
updatedAttributes: string[];
|
|
14
|
+
/** Error message if failed */
|
|
15
|
+
error?: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Updates metadata attributes on a profiling definition.
|
|
19
|
+
*
|
|
20
|
+
* Use this command to change the name, category, time category, segment category,
|
|
21
|
+
* or description of an existing definition without touching its field selection.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```bash
|
|
25
|
+
* # Rename a definition
|
|
26
|
+
* sf cuneiform definition update --target-org myOrg --id a00xx --name "Q1 Revenue Analysis"
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export default class DefinitionUpdate extends CuneiformCommand<DefinitionUpdateCommandResult> {
|
|
30
|
+
static readonly summary: string;
|
|
31
|
+
static readonly description: string;
|
|
32
|
+
static readonly examples: string[];
|
|
33
|
+
static readonly flags: {
|
|
34
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
35
|
+
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
36
|
+
id: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
37
|
+
name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
38
|
+
category: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
39
|
+
'time-category': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
40
|
+
'segment-category': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
41
|
+
description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
42
|
+
format: import("@oclif/core/interfaces").OptionFlag<"table" | "json", import("@oclif/core/interfaces").CustomOptions>;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Executes the update command.
|
|
46
|
+
*
|
|
47
|
+
* @returns DefinitionUpdateCommandResult with success status and updated attributes
|
|
48
|
+
*/
|
|
49
|
+
run(): Promise<DefinitionUpdateCommandResult>;
|
|
50
|
+
private validateAttributeLengths;
|
|
51
|
+
/**
|
|
52
|
+
* Displays update results in the requested format.
|
|
53
|
+
*
|
|
54
|
+
* @param data - Update result data
|
|
55
|
+
* @param format - Output format: 'table' for prose, 'json' for structured JSON
|
|
56
|
+
*/
|
|
57
|
+
private displayResults;
|
|
58
|
+
}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026, PeerNova, Inc. All Rights Reserved.
|
|
3
|
+
* PROPRIETARY AND CONFIDENTIAL. Unauthorized copying, modification,
|
|
4
|
+
* or distribution is strictly prohibited. Use is governed by the
|
|
5
|
+
* Master Subscription Agreement (MSA) between PeerNova, Inc. and the
|
|
6
|
+
* licensee. See LICENSE file in the repo root.
|
|
7
|
+
*/
|
|
8
|
+
import { Flags } from '@salesforce/sf-plugins-core';
|
|
9
|
+
import { Messages } from '@salesforce/core';
|
|
10
|
+
import { CuneiformCommand } from '../../../base/cuneiform-command.js';
|
|
11
|
+
import { ProfilingDefinitionService } from '../../../services/ProfilingDefinitionService.js';
|
|
12
|
+
import { DefinitionUpdateOperation } from '../../../operations/DefinitionUpdateOperation.js';
|
|
13
|
+
import { OrgInfoService } from '../../../services/OrgInfoService.js';
|
|
14
|
+
import { validateSalesforceId } from '../../../services/validation.js';
|
|
15
|
+
import { renderOrgContext } from '../../../utils/formatting/index.js';
|
|
16
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
17
|
+
const messages = Messages.loadMessages('@peernova/cuneiform-sf', 'definition.update');
|
|
18
|
+
/**
|
|
19
|
+
* Updates metadata attributes on a profiling definition.
|
|
20
|
+
*
|
|
21
|
+
* Use this command to change the name, category, time category, segment category,
|
|
22
|
+
* or description of an existing definition without touching its field selection.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```bash
|
|
26
|
+
* # Rename a definition
|
|
27
|
+
* sf cuneiform definition update --target-org myOrg --id a00xx --name "Q1 Revenue Analysis"
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
// eslint-disable-next-line sf-plugin/only-extend-SfCommand -- CuneiformCommand extends SfCommand with shared access gate logic
|
|
31
|
+
export default class DefinitionUpdate extends CuneiformCommand {
|
|
32
|
+
static summary = messages.getMessage('summary');
|
|
33
|
+
static description = messages.getMessage('description');
|
|
34
|
+
static examples = messages.getMessages('examples');
|
|
35
|
+
// eslint-disable-next-line sf-plugin/spread-base-flags -- CuneiformCommand has no additional flags to spread
|
|
36
|
+
static flags = {
|
|
37
|
+
'target-org': Flags.requiredOrg({
|
|
38
|
+
summary: messages.getMessage('flags.target-org.summary'),
|
|
39
|
+
char: 'o',
|
|
40
|
+
required: true,
|
|
41
|
+
}),
|
|
42
|
+
'api-version': Flags.orgApiVersion(),
|
|
43
|
+
id: Flags.string({
|
|
44
|
+
summary: messages.getMessage('flags.id.summary'),
|
|
45
|
+
required: true,
|
|
46
|
+
aliases: ['definition-id'],
|
|
47
|
+
deprecateAliases: true,
|
|
48
|
+
}),
|
|
49
|
+
name: Flags.string({
|
|
50
|
+
summary: messages.getMessage('flags.name.summary'),
|
|
51
|
+
required: false,
|
|
52
|
+
}),
|
|
53
|
+
category: Flags.string({
|
|
54
|
+
summary: messages.getMessage('flags.category.summary'),
|
|
55
|
+
required: false,
|
|
56
|
+
}),
|
|
57
|
+
'time-category': Flags.string({
|
|
58
|
+
summary: messages.getMessage('flags.time-category.summary'),
|
|
59
|
+
required: false,
|
|
60
|
+
}),
|
|
61
|
+
'segment-category': Flags.string({
|
|
62
|
+
summary: messages.getMessage('flags.segment-category.summary'),
|
|
63
|
+
required: false,
|
|
64
|
+
}),
|
|
65
|
+
description: Flags.string({
|
|
66
|
+
summary: messages.getMessage('flags.description.summary'),
|
|
67
|
+
required: false,
|
|
68
|
+
}),
|
|
69
|
+
format: Flags.option({
|
|
70
|
+
summary: messages.getMessage('flags.format.summary'),
|
|
71
|
+
options: ['table', 'json'],
|
|
72
|
+
default: 'table',
|
|
73
|
+
})(),
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Executes the update command.
|
|
77
|
+
*
|
|
78
|
+
* @returns DefinitionUpdateCommandResult with success status and updated attributes
|
|
79
|
+
*/
|
|
80
|
+
async run() {
|
|
81
|
+
const { flags } = await this.parse(DefinitionUpdate);
|
|
82
|
+
const targetOrg = flags['target-org'].getUsername();
|
|
83
|
+
if (!targetOrg) {
|
|
84
|
+
this.error('Could not determine target org username');
|
|
85
|
+
}
|
|
86
|
+
const definitionId = flags.id;
|
|
87
|
+
// Validate definition ID format
|
|
88
|
+
const idValidationError = validateSalesforceId(definitionId);
|
|
89
|
+
if (idValidationError) {
|
|
90
|
+
this.error(messages.getMessage('errors.invalidDefinitionId', [definitionId]), {
|
|
91
|
+
code: 'INVALID_DEFINITION_ID',
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
const format = flags.format ?? 'table';
|
|
95
|
+
const isTable = format === 'table';
|
|
96
|
+
// Collect supplied attributes
|
|
97
|
+
const name = flags.name;
|
|
98
|
+
const category = flags.category;
|
|
99
|
+
const timeCategory = flags['time-category'];
|
|
100
|
+
const segmentCategory = flags['segment-category'];
|
|
101
|
+
const description = flags.description;
|
|
102
|
+
// Validate at least one attribute was supplied
|
|
103
|
+
if (name === undefined &&
|
|
104
|
+
category === undefined &&
|
|
105
|
+
timeCategory === undefined &&
|
|
106
|
+
segmentCategory === undefined &&
|
|
107
|
+
description === undefined) {
|
|
108
|
+
this.error(messages.getMessage('errors.noAttributesProvided'), {
|
|
109
|
+
code: 'NO_ATTRIBUTES_PROVIDED',
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
// Validate length constraints
|
|
113
|
+
this.validateAttributeLengths(name, category, timeCategory, segmentCategory, description);
|
|
114
|
+
// Initialize services
|
|
115
|
+
const { facade, soqlAdapter, restAdapter } = await this.initConnection(flags);
|
|
116
|
+
const definitionService = new ProfilingDefinitionService({ soqlAdapter, restAdapter });
|
|
117
|
+
// Fetch and display org identity
|
|
118
|
+
const orgInfoService = new OrgInfoService({ connectionFacade: facade, soqlAdapter });
|
|
119
|
+
const orgIdentityResult = await orgInfoService.getOrgIdentity();
|
|
120
|
+
if (isTable && orgIdentityResult.success) {
|
|
121
|
+
this.log('');
|
|
122
|
+
this.log(renderOrgContext({
|
|
123
|
+
orgName: orgIdentityResult.data.organizationName,
|
|
124
|
+
orgId: orgIdentityResult.data.organizationId,
|
|
125
|
+
instanceUrl: facade.instanceUrl ?? '',
|
|
126
|
+
isSandbox: orgIdentityResult.data.isSandbox ?? false,
|
|
127
|
+
}));
|
|
128
|
+
}
|
|
129
|
+
// Create operation
|
|
130
|
+
const operation = new DefinitionUpdateOperation(definitionService);
|
|
131
|
+
if (isTable)
|
|
132
|
+
this.log(`Updating definition ${definitionId}...`);
|
|
133
|
+
// Execute operation
|
|
134
|
+
if (isTable)
|
|
135
|
+
this.spinner.start('Updating');
|
|
136
|
+
const result = await operation.execute({
|
|
137
|
+
definitionId,
|
|
138
|
+
attributes: { name, category, timeCategory, segmentCategory, description },
|
|
139
|
+
});
|
|
140
|
+
if (isTable)
|
|
141
|
+
this.spinner.stop();
|
|
142
|
+
// Handle failure
|
|
143
|
+
if (!result.success) {
|
|
144
|
+
this.error(messages.getMessage('errors.updateFailed', [definitionId, result.message ?? 'Unknown error']), {
|
|
145
|
+
code: result.errorCode ?? 'UPDATE_FAILED',
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
// Display results
|
|
149
|
+
this.displayResults(result.data, format);
|
|
150
|
+
return {
|
|
151
|
+
success: true,
|
|
152
|
+
definitionId: result.data.definitionId,
|
|
153
|
+
updated: result.data.updated,
|
|
154
|
+
updatedAttributes: result.data.updatedAttributes,
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
validateAttributeLengths(name, category, timeCategory, segmentCategory, description) {
|
|
158
|
+
if (name !== undefined && name.length > 255) {
|
|
159
|
+
this.error(messages.getMessage('errors.nameTooLong', [String(name.length)]), { code: 'NAME_TOO_LONG' });
|
|
160
|
+
}
|
|
161
|
+
if (category !== undefined && category.length > 255) {
|
|
162
|
+
this.error(messages.getMessage('errors.categoryTooLong', [String(category.length)]), {
|
|
163
|
+
code: 'CATEGORY_TOO_LONG',
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
if (timeCategory !== undefined && timeCategory.length > 255) {
|
|
167
|
+
this.error(messages.getMessage('errors.timeCategoryTooLong', [String(timeCategory.length)]), {
|
|
168
|
+
code: 'TIME_CATEGORY_TOO_LONG',
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
if (segmentCategory !== undefined && segmentCategory.length > 255) {
|
|
172
|
+
this.error(messages.getMessage('errors.segmentCategoryTooLong', [String(segmentCategory.length)]), {
|
|
173
|
+
code: 'SEGMENT_CATEGORY_TOO_LONG',
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
if (description !== undefined && description.length > 8192) {
|
|
177
|
+
this.error(messages.getMessage('errors.descriptionTooLong', [String(description.length)]), {
|
|
178
|
+
code: 'DESCRIPTION_TOO_LONG',
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Displays update results in the requested format.
|
|
184
|
+
*
|
|
185
|
+
* @param data - Update result data
|
|
186
|
+
* @param format - Output format: 'table' for prose, 'json' for structured JSON
|
|
187
|
+
*/
|
|
188
|
+
displayResults(data, format) {
|
|
189
|
+
this.log('');
|
|
190
|
+
if (format === 'json') {
|
|
191
|
+
const output = {
|
|
192
|
+
success: true,
|
|
193
|
+
definitionId: data.definitionId,
|
|
194
|
+
updated: data.updated,
|
|
195
|
+
updatedAttributes: data.updatedAttributes,
|
|
196
|
+
};
|
|
197
|
+
this.log(JSON.stringify(output, null, 2));
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
if (data.updated) {
|
|
201
|
+
this.log(`Successfully updated definition ${data.definitionId}.`);
|
|
202
|
+
this.log(`Updated attributes: ${data.updatedAttributes.join(', ')}`);
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
this.log(`Definition ${data.definitionId} was not updated.`);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/commands/cuneiform/definition/update.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAC;AAC7F,OAAO,EAAE,yBAAyB,EAAqB,MAAM,kDAAkD,CAAC;AAChH,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,wBAAwB,EAAE,mBAAmB,CAAC,CAAC;AAkBtF;;;;;;;;;;;GAWG;AACH,+HAA+H;AAC/H,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,gBAA+C;IACpF,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CA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AAM,EAAE,CAAC;YACtB,MAAM,MAAM,GAAkC;gBAC5C,OAAO,EAAE,IAAI;gBACb,YAAY,EAAE,IAAI,CAAC,YAAY;gBAC/B,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;aAC1C,CAAC;YACF,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YAC1C,OAAO;QACT,CAAC;QAED,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,IAAI,CAAC,GAAG,CAAC,mCAAmC,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;YAClE,IAAI,CAAC,GAAG,CAAC,uBAAuB,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACvE,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,GAAG,CAAC,cAAc,IAAI,CAAC,YAAY,mBAAmB,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { CuneiformCommand } from '../../../base/cuneiform-command.js';
|
|
2
|
+
/**
|
|
3
|
+
* Command result type for JSON output.
|
|
4
|
+
*/
|
|
5
|
+
export type McpServeResult = {
|
|
6
|
+
/** Server status */
|
|
7
|
+
readonly status: 'started';
|
|
8
|
+
/** Server configuration */
|
|
9
|
+
readonly config: {
|
|
10
|
+
readonly name: string;
|
|
11
|
+
readonly version: string;
|
|
12
|
+
readonly targetOrg: string;
|
|
13
|
+
readonly apiVersion?: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Starts the Cuneiform MCP (Model Context Protocol) server.
|
|
18
|
+
*
|
|
19
|
+
* The MCP server exposes Cuneiform CLI commands as MCP tools, enabling
|
|
20
|
+
* LLM clients (like Claude Desktop or Cursor) to invoke Salesforce operations
|
|
21
|
+
* through natural language interactions.
|
|
22
|
+
*
|
|
23
|
+
* Use this command to:
|
|
24
|
+
* - Enable Claude Desktop integration with Cuneiform
|
|
25
|
+
* - Provide LLMs with direct access to Salesforce metadata
|
|
26
|
+
* - Execute read-only operations from AI assistants
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```bash
|
|
30
|
+
* # Start MCP server for a specific org
|
|
31
|
+
* sf cuneiform mcp serve --target-org myOrg
|
|
32
|
+
*
|
|
33
|
+
* # Start with debug logging
|
|
34
|
+
* sf cuneiform mcp serve --target-org myOrg --debug
|
|
35
|
+
*
|
|
36
|
+
* # Start with specific API version
|
|
37
|
+
* sf cuneiform mcp serve --target-org myOrg --api-version 59.0
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export default class McpServe extends CuneiformCommand<McpServeResult> {
|
|
41
|
+
static readonly hidden = true;
|
|
42
|
+
static readonly summary: string;
|
|
43
|
+
static readonly description: string;
|
|
44
|
+
static readonly examples: string[];
|
|
45
|
+
static readonly flags: {
|
|
46
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
47
|
+
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
48
|
+
debug: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Executes the MCP serve command.
|
|
52
|
+
*
|
|
53
|
+
* @returns McpServeResult with server status
|
|
54
|
+
*/
|
|
55
|
+
run(): Promise<McpServeResult>;
|
|
56
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026, PeerNova, Inc. All Rights Reserved.
|
|
3
|
+
* PROPRIETARY AND CONFIDENTIAL. Unauthorized copying, modification,
|
|
4
|
+
* or distribution is strictly prohibited. Use is governed by the
|
|
5
|
+
* Master Subscription Agreement (MSA) between PeerNova, Inc. and the
|
|
6
|
+
* licensee. See LICENSE file in the repo root.
|
|
7
|
+
*/
|
|
8
|
+
import { Flags } from '@salesforce/sf-plugins-core';
|
|
9
|
+
import { Messages } from '@salesforce/core';
|
|
10
|
+
import { CuneiformCommand } from '../../../base/cuneiform-command.js';
|
|
11
|
+
import { createConnectionFacade } from '../../../adapters/connection-facade.js';
|
|
12
|
+
import { createMcpConfig } from '../../../mcp/config/mcp-config.js';
|
|
13
|
+
import { createMcpServer, startMcpServer } from '../../../mcp/server.js';
|
|
14
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
15
|
+
const messages = Messages.loadMessages('@peernova/cuneiform-sf', 'mcp.serve');
|
|
16
|
+
/**
|
|
17
|
+
* Starts the Cuneiform MCP (Model Context Protocol) server.
|
|
18
|
+
*
|
|
19
|
+
* The MCP server exposes Cuneiform CLI commands as MCP tools, enabling
|
|
20
|
+
* LLM clients (like Claude Desktop or Cursor) to invoke Salesforce operations
|
|
21
|
+
* through natural language interactions.
|
|
22
|
+
*
|
|
23
|
+
* Use this command to:
|
|
24
|
+
* - Enable Claude Desktop integration with Cuneiform
|
|
25
|
+
* - Provide LLMs with direct access to Salesforce metadata
|
|
26
|
+
* - Execute read-only operations from AI assistants
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```bash
|
|
30
|
+
* # Start MCP server for a specific org
|
|
31
|
+
* sf cuneiform mcp serve --target-org myOrg
|
|
32
|
+
*
|
|
33
|
+
* # Start with debug logging
|
|
34
|
+
* sf cuneiform mcp serve --target-org myOrg --debug
|
|
35
|
+
*
|
|
36
|
+
* # Start with specific API version
|
|
37
|
+
* sf cuneiform mcp serve --target-org myOrg --api-version 59.0
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
// eslint-disable-next-line sf-plugin/only-extend-SfCommand -- CuneiformCommand extends SfCommand with shared access gate logic
|
|
41
|
+
export default class McpServe extends CuneiformCommand {
|
|
42
|
+
static hidden = true;
|
|
43
|
+
static summary = messages.getMessage('summary');
|
|
44
|
+
static description = messages.getMessage('description');
|
|
45
|
+
static examples = messages.getMessages('examples');
|
|
46
|
+
// eslint-disable-next-line sf-plugin/spread-base-flags -- CuneiformCommand has no additional flags to spread
|
|
47
|
+
static flags = {
|
|
48
|
+
'target-org': Flags.requiredOrg({
|
|
49
|
+
summary: messages.getMessage('flags.target-org.summary'),
|
|
50
|
+
char: 'o',
|
|
51
|
+
required: true,
|
|
52
|
+
}),
|
|
53
|
+
'api-version': Flags.orgApiVersion({
|
|
54
|
+
summary: messages.getMessage('flags.api-version.summary'),
|
|
55
|
+
char: 'a',
|
|
56
|
+
}),
|
|
57
|
+
debug: Flags.boolean({
|
|
58
|
+
summary: messages.getMessage('flags.debug.summary'),
|
|
59
|
+
char: 'd',
|
|
60
|
+
default: false,
|
|
61
|
+
}),
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Executes the MCP serve command.
|
|
65
|
+
*
|
|
66
|
+
* @returns McpServeResult with server status
|
|
67
|
+
*/
|
|
68
|
+
async run() {
|
|
69
|
+
const { flags } = await this.parse(McpServe);
|
|
70
|
+
try {
|
|
71
|
+
// Get connection
|
|
72
|
+
const connection = flags['target-org'].getConnection(flags['api-version']);
|
|
73
|
+
const facade = createConnectionFacade(connection);
|
|
74
|
+
await this.enforceAccessGate(facade);
|
|
75
|
+
// Create MCP config
|
|
76
|
+
const config = createMcpConfig(flags['target-org'].getUsername() ?? flags['target-org'].getOrgId(), flags['api-version'], flags.debug);
|
|
77
|
+
// Create and start MCP server
|
|
78
|
+
const server = createMcpServer(config, connection);
|
|
79
|
+
/* eslint-disable no-console -- MCP uses stderr for logging */
|
|
80
|
+
// Log server startup (stderr - stdout is reserved for MCP JSON-RPC)
|
|
81
|
+
if (flags.debug) {
|
|
82
|
+
console.error(`[MCP] Starting Cuneiform MCP server for org: ${config.targetOrg}`);
|
|
83
|
+
console.error('[MCP] Available tools: cuneiform_org_details, cuneiform_object_list, cuneiform_user_details');
|
|
84
|
+
}
|
|
85
|
+
/* eslint-enable no-console */
|
|
86
|
+
// Start server (this blocks until the server is stopped)
|
|
87
|
+
await startMcpServer(server, flags.debug);
|
|
88
|
+
// If we reach here, server has stopped
|
|
89
|
+
return {
|
|
90
|
+
status: 'started',
|
|
91
|
+
config: {
|
|
92
|
+
name: config.name,
|
|
93
|
+
version: config.version,
|
|
94
|
+
targetOrg: config.targetOrg,
|
|
95
|
+
apiVersion: config.apiVersion,
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
catch (error) {
|
|
100
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
101
|
+
// Log error to stderr
|
|
102
|
+
/* eslint-disable-next-line no-console -- MCP uses stderr for logging */
|
|
103
|
+
console.error(`[MCP] Server error: ${errorMessage}`);
|
|
104
|
+
// Throw to ensure non-zero exit code for scripts and CI/CD
|
|
105
|
+
this.error(`MCP server failed: ${errorMessage}`, { code: 'MCP_SERVER_ERROR' });
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=serve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serve.js","sourceRoot":"","sources":["../../../../src/commands/cuneiform/mcp/serve.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAEzE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,C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IAAI,CAAC,KAAK,CAAC,sBAAsB,YAAY,EAAE,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,CAAC;QACjF,CAAC;IACH,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { CuneiformCommand } from '../../../base/cuneiform-command.js';
|
|
2
|
+
import type { FieldInfo, ObjectResult, ObjectSummary, FieldSummary, RelationshipInfo, ProfilingStatusInfo, ObjectDescribeTotals, ObjectDescribeCommandResult } from '../../../models/object-describe-types.js';
|
|
3
|
+
export type { FieldInfo, ObjectResult, ObjectSummary, FieldSummary, RelationshipInfo, ProfilingStatusInfo, ObjectDescribeTotals, ObjectDescribeCommandResult, };
|
|
4
|
+
/**
|
|
5
|
+
* Describes Salesforce objects with comprehensive metadata and field analysis.
|
|
6
|
+
*
|
|
7
|
+
* Use this command to:
|
|
8
|
+
* - Understand object structure before creating profiling definitions
|
|
9
|
+
* - Analyze field inventory by type and namespace
|
|
10
|
+
* - Review record types and their configurations
|
|
11
|
+
* - Identify how many other objects reference this object
|
|
12
|
+
* - Assess record age distribution
|
|
13
|
+
* - Check existing profiling definitions
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```bash
|
|
17
|
+
* # Describe Account object
|
|
18
|
+
* sf cuneiform object describe --object Account
|
|
19
|
+
*
|
|
20
|
+
* # Describe multiple objects
|
|
21
|
+
* sf cuneiform object describe --object Account,Contact,Opportunity
|
|
22
|
+
*
|
|
23
|
+
* # Include field listing
|
|
24
|
+
* sf cuneiform object describe --object Account --with-fields
|
|
25
|
+
*
|
|
26
|
+
* # Filter to lookup fields, sorted by type
|
|
27
|
+
* sf cuneiform object describe --object Account --with-fields --field-type lookup --sort type
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export default class ObjectDescribe extends CuneiformCommand<ObjectDescribeCommandResult> {
|
|
31
|
+
static readonly summary: string;
|
|
32
|
+
static readonly description: string;
|
|
33
|
+
static readonly examples: string[];
|
|
34
|
+
static readonly flags: {
|
|
35
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
36
|
+
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
37
|
+
object: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
38
|
+
'with-fields': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
39
|
+
'field-type': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
40
|
+
'field-pattern': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
41
|
+
sort: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Computes aggregate totals across all described objects.
|
|
45
|
+
*/
|
|
46
|
+
private static computeTotals;
|
|
47
|
+
/**
|
|
48
|
+
* Executes the object describe command.
|
|
49
|
+
*
|
|
50
|
+
* @returns ObjectDescribeCommandResult with object metadata
|
|
51
|
+
*/
|
|
52
|
+
run(): Promise<ObjectDescribeCommandResult>;
|
|
53
|
+
/**
|
|
54
|
+
* Enriches business processes with per-process record age distributions.
|
|
55
|
+
*/
|
|
56
|
+
private enrichBusinessProcesses;
|
|
57
|
+
/**
|
|
58
|
+
* Describes an object and formats the result.
|
|
59
|
+
*/
|
|
60
|
+
private describeAndFormat;
|
|
61
|
+
}
|