@peernova/cuneiform-sf 1.0.2 → 1.0.4-beta.8
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 +59 -95
- 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/index.d.ts +33 -0
- package/lib/adapters/index.js +50 -0
- package/lib/adapters/index.js.map +1 -0
- package/lib/adapters/lifecycle.d.ts +119 -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 +389 -0
- package/lib/adapters/rest/rest-api-adapter.js +747 -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 +391 -0
- package/lib/adapters/soql/cuneiform-query-builder.js +559 -0
- package/lib/adapters/soql/cuneiform-query-builder.js.map +1 -0
- package/lib/adapters/soql/index.d.ts +13 -0
- package/lib/adapters/soql/index.js +21 -0
- package/lib/adapters/soql/index.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 +152 -0
- package/lib/base/cuneiform-command.js +243 -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 +119 -0
- package/lib/commands/cuneiform/definition/create.js +693 -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 +270 -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 +344 -0
- package/lib/commands/cuneiform/definition/list.js.map +1 -0
- package/lib/commands/cuneiform/definition/purge.d.ts +105 -0
- package/lib/commands/cuneiform/definition/purge.js +533 -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 +206 -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 +111 -0
- package/lib/commands/cuneiform/object/list.js +239 -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 +90 -0
- package/lib/commands/cuneiform/profile.js +322 -0
- package/lib/commands/cuneiform/profile.js.map +1 -0
- package/lib/commands/cuneiform/summary/purge.d.ts +77 -0
- package/lib/commands/cuneiform/summary/purge.js +429 -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 +73 -0
- package/lib/commands/cuneiform/user/details.js +391 -0
- package/lib/commands/cuneiform/user/details.js.map +1 -0
- package/lib/constants/index.d.ts +8 -0
- package/lib/constants/index.js +16 -0
- package/lib/constants/index.js.map +1 -0
- package/lib/constants/namespace-constants.d.ts +91 -0
- package/lib/constants/namespace-constants.js +211 -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/index.d.ts +12 -0
- package/lib/debug/index.js +20 -0
- package/lib/debug/index.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 +302 -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 +199 -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 +306 -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/date-literal.d.ts +211 -0
- package/lib/models/date-literal.js +615 -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/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 +53 -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 +163 -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 +411 -0
- package/lib/operations/DefinitionCreateOperation.js +1121 -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 +199 -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 +187 -0
- package/lib/operations/ProfileOperation.js +373 -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 +85 -0
- package/lib/services/ConfigureMode.js +390 -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 +309 -0
- package/lib/services/DefinitionFieldGenerationService.js +795 -0
- package/lib/services/DefinitionFieldGenerationService.js.map +1 -0
- package/lib/services/DefinitionQueryBuilder.d.ts +59 -0
- package/lib/services/DefinitionQueryBuilder.js +234 -0
- package/lib/services/DefinitionQueryBuilder.js.map +1 -0
- package/lib/services/ObjectDescribeService.d.ts +436 -0
- package/lib/services/ObjectDescribeService.js +869 -0
- package/lib/services/ObjectDescribeService.js.map +1 -0
- package/lib/services/ObjectFilteringService.d.ts +400 -0
- package/lib/services/ObjectFilteringService.js +878 -0
- package/lib/services/ObjectFilteringService.js.map +1 -0
- package/lib/services/ObjectListCommandService.d.ts +429 -0
- package/lib/services/ObjectListCommandService.js +873 -0
- package/lib/services/ObjectListCommandService.js.map +1 -0
- package/lib/services/ObjectListService.d.ts +201 -0
- package/lib/services/ObjectListService.js +345 -0
- package/lib/services/ObjectListService.js.map +1 -0
- package/lib/services/OrgInfoService.d.ts +485 -0
- package/lib/services/OrgInfoService.js +1122 -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 +535 -0
- package/lib/services/ProfilingDefinitionService.js +981 -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 +685 -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 +133 -0
- package/lib/services/SFDMUService.js +295 -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 +155 -0
- package/lib/services/UserConfigurationService.js +573 -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 +330 -0
- package/lib/services/UserReadinessService.js +831 -0
- package/lib/services/UserReadinessService.js.map +1 -0
- package/lib/services/constants.d.ts +53 -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/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 +231 -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 +114 -0
- package/lib/utils/formatting/object-describe-display.js +440 -0
- package/lib/utils/formatting/object-describe-display.js.map +1 -0
- package/lib/utils/formatting/object-list-display.d.ts +213 -0
- package/lib/utils/formatting/object-list-display.js +672 -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/index.d.ts +11 -0
- package/lib/utils/pagination/index.js +18 -0
- package/lib/utils/pagination/index.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 +511 -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 +318 -0
- package/messages/definition.update.md +118 -0
- package/messages/mcp.serve.md +66 -0
- package/messages/object.describe.md +201 -0
- package/messages/object.list.md +443 -0
- package/messages/org.details.md +386 -0
- package/messages/org.reset.md +71 -0
- package/messages/profile.md +231 -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 +2887 -2149
- package/oclif.manifest.json +2813 -31
- package/package.json +94 -19
- 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,236 @@
|
|
|
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 { ProfilingSummaryService } from '../../../services/ProfilingSummaryService.js';
|
|
12
|
+
import { SummaryReprofileOperation, SummaryReprofileErrorCodes, } from '../../../operations/SummaryReprofileOperation.js';
|
|
13
|
+
import { OrgInfoService } from '../../../services/OrgInfoService.js';
|
|
14
|
+
import { displaySummaryBox } from '../../../utils/formatting/command-display.js';
|
|
15
|
+
import { displayOrgIdentity } from '../../../utils/formatting/org-identity.js';
|
|
16
|
+
import { formatNumber } from '../../../utils/formatting/numbers.js';
|
|
17
|
+
import { statusSymbol } from '../../../utils/formatting/indicators.js';
|
|
18
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
19
|
+
const messages = Messages.loadMessages('@peernova/cuneiform-sf', 'summary.reprofile');
|
|
20
|
+
/**
|
|
21
|
+
* Reprofiles failed or stopped profiling summaries in a Salesforce org.
|
|
22
|
+
*
|
|
23
|
+
* Submits failed or stopped summaries for re-profiling. This is a
|
|
24
|
+
* fire-and-forget operation — the ISV backend handles the actual profiling.
|
|
25
|
+
*/
|
|
26
|
+
// eslint-disable-next-line sf-plugin/only-extend-SfCommand -- CuneiformCommand extends SfCommand with shared access gate logic
|
|
27
|
+
export default class SummaryReprofile extends CuneiformCommand {
|
|
28
|
+
static summary = messages.getMessage('summary');
|
|
29
|
+
static description = messages.getMessage('description');
|
|
30
|
+
static examples = messages.getMessages('examples');
|
|
31
|
+
// eslint-disable-next-line sf-plugin/spread-base-flags -- CuneiformCommand has no additional flags to spread
|
|
32
|
+
static flags = {
|
|
33
|
+
'target-org': Flags.requiredOrg({
|
|
34
|
+
summary: messages.getMessage('flags.target-org.summary'),
|
|
35
|
+
char: 'o',
|
|
36
|
+
required: true,
|
|
37
|
+
}),
|
|
38
|
+
'api-version': Flags.orgApiVersion(),
|
|
39
|
+
ids: Flags.string({
|
|
40
|
+
summary: messages.getMessage('flags.ids.summary'),
|
|
41
|
+
char: 'i',
|
|
42
|
+
multiple: true,
|
|
43
|
+
}),
|
|
44
|
+
all: Flags.boolean({
|
|
45
|
+
summary: messages.getMessage('flags.all.summary'),
|
|
46
|
+
char: 'a',
|
|
47
|
+
}),
|
|
48
|
+
objects: Flags.string({
|
|
49
|
+
summary: messages.getMessage('flags.objects.summary'),
|
|
50
|
+
char: 'b',
|
|
51
|
+
multiple: true,
|
|
52
|
+
}),
|
|
53
|
+
'dry-run': Flags.boolean({
|
|
54
|
+
summary: messages.getMessage('flags.dry-run.summary'),
|
|
55
|
+
char: 'd',
|
|
56
|
+
default: false,
|
|
57
|
+
}),
|
|
58
|
+
'no-prompt': Flags.boolean({
|
|
59
|
+
summary: messages.getMessage('flags.no-prompt.summary'),
|
|
60
|
+
char: 'y',
|
|
61
|
+
default: false,
|
|
62
|
+
}),
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Maps error codes to i18n message keys.
|
|
66
|
+
*/
|
|
67
|
+
static ERROR_CODE_MAP = {
|
|
68
|
+
[SummaryReprofileErrorCodes.NO_SELECTION_CRITERIA]: 'errors.noSelectionCriteria',
|
|
69
|
+
[SummaryReprofileErrorCodes.MUTUALLY_EXCLUSIVE]: 'errors.mutuallyExclusive',
|
|
70
|
+
[SummaryReprofileErrorCodes.NO_ELIGIBLE_SUMMARIES]: 'errors.noEligibleSummaries',
|
|
71
|
+
[SummaryReprofileErrorCodes.QUERY_FAILED]: 'errors.queryFailed',
|
|
72
|
+
[SummaryReprofileErrorCodes.REPROFILE_FAILED]: 'errors.reprofileFailed',
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Executes the summary reprofile command.
|
|
76
|
+
*/
|
|
77
|
+
async run() {
|
|
78
|
+
const { flags } = await this.parse(SummaryReprofile);
|
|
79
|
+
const targetOrg = flags['target-org'].getUsername();
|
|
80
|
+
if (!targetOrg) {
|
|
81
|
+
this.error(messages.getMessage('errors.noTargetOrg'));
|
|
82
|
+
}
|
|
83
|
+
const dryRun = flags['dry-run'];
|
|
84
|
+
const noPrompt = flags['no-prompt'];
|
|
85
|
+
// Initialize services
|
|
86
|
+
const { facade, soqlAdapter, restAdapter } = await this.initConnection(flags);
|
|
87
|
+
const summaryService = new ProfilingSummaryService({ soqlAdapter, restAdapter });
|
|
88
|
+
const orgInfoService = new OrgInfoService({ connectionFacade: facade, soqlAdapter });
|
|
89
|
+
const operation = new SummaryReprofileOperation(summaryService);
|
|
90
|
+
// Build operation options
|
|
91
|
+
const operationOptions = {
|
|
92
|
+
all: flags.all,
|
|
93
|
+
ids: SummaryReprofile.parseMultiValueFlag(flags.ids),
|
|
94
|
+
objects: SummaryReprofile.parseMultiValueFlag(flags.objects),
|
|
95
|
+
dryRun,
|
|
96
|
+
noPrompt,
|
|
97
|
+
onSummariesFound: (count) => {
|
|
98
|
+
this.spinner.stop(`${count} reprofilable summary(ies) found`);
|
|
99
|
+
},
|
|
100
|
+
onConfirm: async (count) => {
|
|
101
|
+
// For --json mode, skip interactive prompt
|
|
102
|
+
if (this.jsonEnabled())
|
|
103
|
+
return true;
|
|
104
|
+
return this.confirm({
|
|
105
|
+
message: count === 1
|
|
106
|
+
? messages.getMessage('prompt.confirm.singular')
|
|
107
|
+
: messages.getMessage('prompt.confirm.plural', [String(count)]),
|
|
108
|
+
});
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
// Fetch org identity
|
|
112
|
+
const modeText = dryRun ? '(dry run) ' : '';
|
|
113
|
+
this.log(`Re-profiling Summaries ${modeText}...`);
|
|
114
|
+
this.spinner.start('Connecting');
|
|
115
|
+
const orgIdentityResult = await orgInfoService.getOrgIdentity();
|
|
116
|
+
this.spinner.stop();
|
|
117
|
+
if (orgIdentityResult.success) {
|
|
118
|
+
displayOrgIdentity(this.log.bind(this), orgIdentityResult.data, facade.instanceUrl);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
this.warn(`Could not retrieve org identity: ${orgIdentityResult.message ?? 'Unknown error'}. Verify you are targeting the correct org.`);
|
|
122
|
+
}
|
|
123
|
+
// Execute reprofile
|
|
124
|
+
this.log('');
|
|
125
|
+
this.spinner.start('Retrieving Eligible Summaries');
|
|
126
|
+
const result = await operation.execute(operationOptions);
|
|
127
|
+
this.spinner.stop();
|
|
128
|
+
// Handle no eligible summaries
|
|
129
|
+
if (!result.success && result.errorCode === SummaryReprofileErrorCodes.NO_ELIGIBLE_SUMMARIES) {
|
|
130
|
+
this.log('');
|
|
131
|
+
this.log(messages.getMessage('output.noEligible.message'));
|
|
132
|
+
this.log(messages.getMessage('output.noEligible.guidance'));
|
|
133
|
+
this.log('');
|
|
134
|
+
const zeroEntries = [
|
|
135
|
+
{ key: messages.getMessage('output.summary.submitted'), value: formatNumber(0) },
|
|
136
|
+
{ key: messages.getMessage('output.summary.failed'), value: formatNumber(0) },
|
|
137
|
+
{ key: messages.getMessage('output.summary.total'), value: formatNumber(0) },
|
|
138
|
+
];
|
|
139
|
+
displaySummaryBox(this.log.bind(this), {
|
|
140
|
+
title: messages.getMessage('output.summaryHeader'),
|
|
141
|
+
entries: zeroEntries,
|
|
142
|
+
});
|
|
143
|
+
return {
|
|
144
|
+
success: true,
|
|
145
|
+
submitted: 0,
|
|
146
|
+
failed: 0,
|
|
147
|
+
total: 0,
|
|
148
|
+
dryRun: dryRun ?? false,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
// Handle user cancellation
|
|
152
|
+
if (result.success && result.data.cancelled) {
|
|
153
|
+
this.log('');
|
|
154
|
+
this.log(messages.getMessage('output.cancelled'));
|
|
155
|
+
return {
|
|
156
|
+
success: true,
|
|
157
|
+
submitted: 0,
|
|
158
|
+
failed: 0,
|
|
159
|
+
total: result.data.total,
|
|
160
|
+
dryRun: dryRun ?? false,
|
|
161
|
+
cancelled: true,
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
// Handle other failures
|
|
165
|
+
if (!result.success) {
|
|
166
|
+
const errorMessage = SummaryReprofile.resolveErrorMessage(SummaryReprofile.ERROR_CODE_MAP, result.errorCode, result.message ?? 'Unknown error', messages);
|
|
167
|
+
this.error(errorMessage, { code: result.errorCode });
|
|
168
|
+
}
|
|
169
|
+
const data = result.data;
|
|
170
|
+
// Display results
|
|
171
|
+
this.displayResults(data, dryRun);
|
|
172
|
+
return {
|
|
173
|
+
success: true,
|
|
174
|
+
submitted: data.submitted,
|
|
175
|
+
failed: data.failed,
|
|
176
|
+
total: data.total,
|
|
177
|
+
dryRun: dryRun ?? false,
|
|
178
|
+
results: data.apiResults?.results,
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Displays reprofile results.
|
|
183
|
+
*/
|
|
184
|
+
displayResults(data, dryRun) {
|
|
185
|
+
this.log('');
|
|
186
|
+
// Dry-run banner
|
|
187
|
+
if (dryRun && data.preview) {
|
|
188
|
+
this.log(messages.getMessage('output.dryRunBanner', [String(data.preview.length)]));
|
|
189
|
+
this.log('');
|
|
190
|
+
if (data.preview.length > 0) {
|
|
191
|
+
this.table({
|
|
192
|
+
data: data.preview.map((s) => ({
|
|
193
|
+
definitionKey: s.definitionKey,
|
|
194
|
+
summaryKey: s.summaryKey,
|
|
195
|
+
object: s.objectName,
|
|
196
|
+
status: s.overallStatus,
|
|
197
|
+
action: 'REPROFILE',
|
|
198
|
+
})),
|
|
199
|
+
columns: [
|
|
200
|
+
{ key: 'definitionKey', name: 'DEF KEY' },
|
|
201
|
+
{ key: 'summaryKey', name: 'SUMMARY KEY' },
|
|
202
|
+
{ key: 'object', name: 'OBJECT' },
|
|
203
|
+
{ key: 'status', name: 'STATUS' },
|
|
204
|
+
{ key: 'action', name: 'ACTION' },
|
|
205
|
+
],
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
// Per-item results table (non-dry-run)
|
|
210
|
+
if (!dryRun && data.apiResults) {
|
|
211
|
+
this.table({
|
|
212
|
+
data: data.apiResults.results.map((r) => ({
|
|
213
|
+
id: r.id,
|
|
214
|
+
requestId: r.requestId ?? '--',
|
|
215
|
+
result: r.success ? `${statusSymbol('success')}` : `${statusSymbol('error')} ${r.message ?? 'Failed'}`,
|
|
216
|
+
})),
|
|
217
|
+
columns: [
|
|
218
|
+
{ key: 'id', name: 'SUMMARY ID' },
|
|
219
|
+
{ key: 'requestId', name: 'REQUEST ID' },
|
|
220
|
+
{ key: 'result', name: 'RESULT' },
|
|
221
|
+
],
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
// Summary box
|
|
225
|
+
const summaryEntries = [
|
|
226
|
+
{ key: messages.getMessage('output.summary.submitted'), value: formatNumber(data.submitted) },
|
|
227
|
+
{ key: messages.getMessage('output.summary.failed'), value: formatNumber(data.failed) },
|
|
228
|
+
{ key: messages.getMessage('output.summary.total'), value: formatNumber(data.total) },
|
|
229
|
+
];
|
|
230
|
+
displaySummaryBox(this.log.bind(this), {
|
|
231
|
+
title: messages.getMessage('output.summaryHeader'),
|
|
232
|
+
entries: summaryEntries,
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
//# sourceMappingURL=reprofile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reprofile.js","sourceRoot":"","sources":["../../../../src/commands/cuneiform/summary/reprofile.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,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EACL,yBAAyB,EAGzB,0BAA0B,GAC3B,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAqB,MAAM,8CAA8C,CAAC;AACpG,OAAO,EAAE,kB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0BAA0B,CAAC,EAAE,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;YAC7F,EAAE,GAAG,EAAE,QAAQ,CAAC,UAAU,CAAC,uBAAuB,CAAC,EAAE,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;YACvF,EAAE,GAAG,EAAE,QAAQ,CAAC,UAAU,CAAC,sBAAsB,CAAC,EAAE,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;SACtF,CAAC;QACF,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YACrC,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,sBAAsB,CAAC;YAClD,OAAO,EAAE,cAAc;SACxB,CAAC,CAAC;IACL,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { CuneiformCommand } from '../../../base/cuneiform-command.js';
|
|
2
|
+
/**
|
|
3
|
+
* Command result type for JSON output.
|
|
4
|
+
*/
|
|
5
|
+
export type SummaryStopCommandResult = {
|
|
6
|
+
/** Whether the operation was successful */
|
|
7
|
+
success: boolean;
|
|
8
|
+
/** Number of summaries stopped */
|
|
9
|
+
stopped: number;
|
|
10
|
+
/** Number of summaries that failed to stop */
|
|
11
|
+
failed: number;
|
|
12
|
+
/** Total number of summaries processed */
|
|
13
|
+
total: number;
|
|
14
|
+
/** Whether this was a dry run */
|
|
15
|
+
dryRun: boolean;
|
|
16
|
+
/** Whether the operation was cancelled by the user */
|
|
17
|
+
cancelled?: boolean;
|
|
18
|
+
/** Error message if failed */
|
|
19
|
+
error?: string;
|
|
20
|
+
/** Per-item results for JSON output */
|
|
21
|
+
results?: Array<{
|
|
22
|
+
id: string;
|
|
23
|
+
success: boolean;
|
|
24
|
+
errorCode?: string;
|
|
25
|
+
message?: string;
|
|
26
|
+
}>;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Stops profiling for in-progress summaries in a Salesforce org.
|
|
30
|
+
*
|
|
31
|
+
* Sends a stop signal to in-progress profiling summaries. This is a
|
|
32
|
+
* fire-and-forget operation — the ISV backend handles the actual stop.
|
|
33
|
+
*/
|
|
34
|
+
export default class SummaryStop extends CuneiformCommand<SummaryStopCommandResult> {
|
|
35
|
+
static readonly summary: string;
|
|
36
|
+
static readonly description: string;
|
|
37
|
+
static readonly examples: string[];
|
|
38
|
+
static readonly flags: {
|
|
39
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
40
|
+
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
41
|
+
ids: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
42
|
+
all: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
43
|
+
objects: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
44
|
+
'dry-run': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
45
|
+
'no-prompt': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Maps error codes to i18n message keys.
|
|
49
|
+
*/
|
|
50
|
+
private static readonly ERROR_CODE_MAP;
|
|
51
|
+
/**
|
|
52
|
+
* Executes the summary stop command.
|
|
53
|
+
*/
|
|
54
|
+
run(): Promise<SummaryStopCommandResult>;
|
|
55
|
+
/**
|
|
56
|
+
* Displays stop results.
|
|
57
|
+
*/
|
|
58
|
+
private displayResults;
|
|
59
|
+
}
|
|
@@ -0,0 +1,234 @@
|
|
|
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 { ProfilingSummaryService } from '../../../services/ProfilingSummaryService.js';
|
|
12
|
+
import { SummaryStopOperation, SummaryStopErrorCodes, } from '../../../operations/SummaryStopOperation.js';
|
|
13
|
+
import { OrgInfoService } from '../../../services/OrgInfoService.js';
|
|
14
|
+
import { displaySummaryBox } from '../../../utils/formatting/command-display.js';
|
|
15
|
+
import { displayOrgIdentity } from '../../../utils/formatting/org-identity.js';
|
|
16
|
+
import { formatNumber } from '../../../utils/formatting/numbers.js';
|
|
17
|
+
import { statusSymbol } from '../../../utils/formatting/indicators.js';
|
|
18
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
19
|
+
const messages = Messages.loadMessages('@peernova/cuneiform-sf', 'summary.stop');
|
|
20
|
+
/**
|
|
21
|
+
* Stops profiling for in-progress summaries in a Salesforce org.
|
|
22
|
+
*
|
|
23
|
+
* Sends a stop signal to in-progress profiling summaries. This is a
|
|
24
|
+
* fire-and-forget operation — the ISV backend handles the actual stop.
|
|
25
|
+
*/
|
|
26
|
+
// eslint-disable-next-line sf-plugin/only-extend-SfCommand -- CuneiformCommand extends SfCommand with shared access gate logic
|
|
27
|
+
export default class SummaryStop extends CuneiformCommand {
|
|
28
|
+
static summary = messages.getMessage('summary');
|
|
29
|
+
static description = messages.getMessage('description');
|
|
30
|
+
static examples = messages.getMessages('examples');
|
|
31
|
+
// eslint-disable-next-line sf-plugin/spread-base-flags -- CuneiformCommand has no additional flags to spread
|
|
32
|
+
static flags = {
|
|
33
|
+
'target-org': Flags.requiredOrg({
|
|
34
|
+
summary: messages.getMessage('flags.target-org.summary'),
|
|
35
|
+
char: 'o',
|
|
36
|
+
required: true,
|
|
37
|
+
}),
|
|
38
|
+
'api-version': Flags.orgApiVersion(),
|
|
39
|
+
ids: Flags.string({
|
|
40
|
+
summary: messages.getMessage('flags.ids.summary'),
|
|
41
|
+
char: 'i',
|
|
42
|
+
multiple: true,
|
|
43
|
+
}),
|
|
44
|
+
all: Flags.boolean({
|
|
45
|
+
summary: messages.getMessage('flags.all.summary'),
|
|
46
|
+
char: 'a',
|
|
47
|
+
}),
|
|
48
|
+
objects: Flags.string({
|
|
49
|
+
summary: messages.getMessage('flags.objects.summary'),
|
|
50
|
+
char: 'b',
|
|
51
|
+
multiple: true,
|
|
52
|
+
}),
|
|
53
|
+
'dry-run': Flags.boolean({
|
|
54
|
+
summary: messages.getMessage('flags.dry-run.summary'),
|
|
55
|
+
char: 'd',
|
|
56
|
+
default: false,
|
|
57
|
+
}),
|
|
58
|
+
'no-prompt': Flags.boolean({
|
|
59
|
+
summary: messages.getMessage('flags.no-prompt.summary'),
|
|
60
|
+
char: 'y',
|
|
61
|
+
default: false,
|
|
62
|
+
}),
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Maps error codes to i18n message keys.
|
|
66
|
+
*/
|
|
67
|
+
static ERROR_CODE_MAP = {
|
|
68
|
+
[SummaryStopErrorCodes.NO_SELECTION_CRITERIA]: 'errors.noSelectionCriteria',
|
|
69
|
+
[SummaryStopErrorCodes.MUTUALLY_EXCLUSIVE]: 'errors.mutuallyExclusive',
|
|
70
|
+
[SummaryStopErrorCodes.NO_ELIGIBLE_SUMMARIES]: 'errors.noEligibleSummaries',
|
|
71
|
+
[SummaryStopErrorCodes.QUERY_FAILED]: 'errors.queryFailed',
|
|
72
|
+
[SummaryStopErrorCodes.STOP_FAILED]: 'errors.stopFailed',
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Executes the summary stop command.
|
|
76
|
+
*/
|
|
77
|
+
async run() {
|
|
78
|
+
const { flags } = await this.parse(SummaryStop);
|
|
79
|
+
const targetOrg = flags['target-org'].getUsername();
|
|
80
|
+
if (!targetOrg) {
|
|
81
|
+
this.error(messages.getMessage('errors.noTargetOrg'));
|
|
82
|
+
}
|
|
83
|
+
const dryRun = flags['dry-run'];
|
|
84
|
+
const noPrompt = flags['no-prompt'];
|
|
85
|
+
// Initialize services
|
|
86
|
+
const { facade, soqlAdapter, restAdapter } = await this.initConnection(flags);
|
|
87
|
+
const summaryService = new ProfilingSummaryService({ soqlAdapter, restAdapter });
|
|
88
|
+
const orgInfoService = new OrgInfoService({ connectionFacade: facade, soqlAdapter });
|
|
89
|
+
const operation = new SummaryStopOperation(summaryService);
|
|
90
|
+
// Build operation options
|
|
91
|
+
const operationOptions = {
|
|
92
|
+
all: flags.all,
|
|
93
|
+
ids: SummaryStop.parseMultiValueFlag(flags.ids),
|
|
94
|
+
objects: SummaryStop.parseMultiValueFlag(flags.objects),
|
|
95
|
+
dryRun,
|
|
96
|
+
noPrompt,
|
|
97
|
+
onSummariesFound: (count) => {
|
|
98
|
+
this.spinner.stop(`${count} in-progress summary(ies) found`);
|
|
99
|
+
},
|
|
100
|
+
onConfirm: async (count) => {
|
|
101
|
+
// For --json mode, skip interactive prompt
|
|
102
|
+
if (this.jsonEnabled())
|
|
103
|
+
return true;
|
|
104
|
+
return this.confirm({
|
|
105
|
+
message: count === 1
|
|
106
|
+
? messages.getMessage('prompt.confirm.singular')
|
|
107
|
+
: messages.getMessage('prompt.confirm.plural', [String(count)]),
|
|
108
|
+
});
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
// Fetch org identity
|
|
112
|
+
const modeText = dryRun ? '(dry run) ' : '';
|
|
113
|
+
this.log(`Stopping Profiling Summaries ${modeText}...`);
|
|
114
|
+
this.spinner.start('Connecting');
|
|
115
|
+
const orgIdentityResult = await orgInfoService.getOrgIdentity();
|
|
116
|
+
this.spinner.stop();
|
|
117
|
+
if (orgIdentityResult.success) {
|
|
118
|
+
displayOrgIdentity(this.log.bind(this), orgIdentityResult.data, facade.instanceUrl);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
this.warn(`Could not retrieve org identity: ${orgIdentityResult.message ?? 'Unknown error'}. Verify you are targeting the correct org.`);
|
|
122
|
+
}
|
|
123
|
+
// Execute stop
|
|
124
|
+
this.log('');
|
|
125
|
+
this.spinner.start('Retrieving In-Progress Summaries');
|
|
126
|
+
const result = await operation.execute(operationOptions);
|
|
127
|
+
this.spinner.stop();
|
|
128
|
+
// Handle no eligible summaries
|
|
129
|
+
if (!result.success && result.errorCode === SummaryStopErrorCodes.NO_ELIGIBLE_SUMMARIES) {
|
|
130
|
+
this.log('');
|
|
131
|
+
this.log(messages.getMessage('output.noEligible.message'));
|
|
132
|
+
this.log(messages.getMessage('output.noEligible.guidance'));
|
|
133
|
+
this.log('');
|
|
134
|
+
const zeroEntries = [
|
|
135
|
+
{ key: messages.getMessage('output.summary.stopped'), value: formatNumber(0) },
|
|
136
|
+
{ key: messages.getMessage('output.summary.failed'), value: formatNumber(0) },
|
|
137
|
+
{ key: messages.getMessage('output.summary.total'), value: formatNumber(0) },
|
|
138
|
+
];
|
|
139
|
+
displaySummaryBox(this.log.bind(this), {
|
|
140
|
+
title: messages.getMessage('output.summaryHeader'),
|
|
141
|
+
entries: zeroEntries,
|
|
142
|
+
});
|
|
143
|
+
return {
|
|
144
|
+
success: true,
|
|
145
|
+
stopped: 0,
|
|
146
|
+
failed: 0,
|
|
147
|
+
total: 0,
|
|
148
|
+
dryRun: dryRun ?? false,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
// Handle user cancellation
|
|
152
|
+
if (result.success && result.data.cancelled) {
|
|
153
|
+
this.log('');
|
|
154
|
+
this.log(messages.getMessage('output.cancelled'));
|
|
155
|
+
return {
|
|
156
|
+
success: true,
|
|
157
|
+
stopped: 0,
|
|
158
|
+
failed: 0,
|
|
159
|
+
total: result.data.total,
|
|
160
|
+
dryRun: dryRun ?? false,
|
|
161
|
+
cancelled: true,
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
// Handle other failures
|
|
165
|
+
if (!result.success) {
|
|
166
|
+
const errorMessage = SummaryStop.resolveErrorMessage(SummaryStop.ERROR_CODE_MAP, result.errorCode, result.message ?? 'Unknown error', messages);
|
|
167
|
+
this.error(errorMessage, { code: result.errorCode });
|
|
168
|
+
}
|
|
169
|
+
const data = result.data;
|
|
170
|
+
// Display results
|
|
171
|
+
this.displayResults(data, dryRun);
|
|
172
|
+
return {
|
|
173
|
+
success: true,
|
|
174
|
+
stopped: data.stopped,
|
|
175
|
+
failed: data.failed,
|
|
176
|
+
total: data.total,
|
|
177
|
+
dryRun: dryRun ?? false,
|
|
178
|
+
results: data.apiResults?.results,
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Displays stop results.
|
|
183
|
+
*/
|
|
184
|
+
displayResults(data, dryRun) {
|
|
185
|
+
this.log('');
|
|
186
|
+
// Dry-run banner
|
|
187
|
+
if (dryRun && data.preview) {
|
|
188
|
+
this.log(messages.getMessage('output.dryRunBanner', [String(data.preview.length)]));
|
|
189
|
+
this.log('');
|
|
190
|
+
if (data.preview.length > 0) {
|
|
191
|
+
this.table({
|
|
192
|
+
data: data.preview.map((s) => ({
|
|
193
|
+
definitionKey: s.definitionKey,
|
|
194
|
+
summaryKey: s.summaryKey,
|
|
195
|
+
object: s.objectName,
|
|
196
|
+
status: s.overallStatus,
|
|
197
|
+
action: 'STOP',
|
|
198
|
+
})),
|
|
199
|
+
columns: [
|
|
200
|
+
{ key: 'definitionKey', name: 'DEF KEY' },
|
|
201
|
+
{ key: 'summaryKey', name: 'SUMMARY KEY' },
|
|
202
|
+
{ key: 'object', name: 'OBJECT' },
|
|
203
|
+
{ key: 'status', name: 'STATUS' },
|
|
204
|
+
{ key: 'action', name: 'ACTION' },
|
|
205
|
+
],
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
// Per-item results table (non-dry-run)
|
|
210
|
+
if (!dryRun && data.apiResults) {
|
|
211
|
+
this.table({
|
|
212
|
+
data: data.apiResults.results.map((r) => ({
|
|
213
|
+
id: r.id,
|
|
214
|
+
result: r.success ? `${statusSymbol('success')}` : `${statusSymbol('error')} ${r.message ?? 'Failed'}`,
|
|
215
|
+
})),
|
|
216
|
+
columns: [
|
|
217
|
+
{ key: 'id', name: 'SUMMARY ID' },
|
|
218
|
+
{ key: 'result', name: 'RESULT' },
|
|
219
|
+
],
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
// Summary box
|
|
223
|
+
const summaryEntries = [
|
|
224
|
+
{ key: messages.getMessage('output.summary.stopped'), value: formatNumber(data.stopped) },
|
|
225
|
+
{ key: messages.getMessage('output.summary.failed'), value: formatNumber(data.failed) },
|
|
226
|
+
{ key: messages.getMessage('output.summary.total'), value: formatNumber(data.total) },
|
|
227
|
+
];
|
|
228
|
+
displaySummaryBox(this.log.bind(this), {
|
|
229
|
+
title: messages.getMessage('output.summaryHeader'),
|
|
230
|
+
entries: summaryEntries,
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
//# sourceMappingURL=stop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stop.js","sourceRoot":"","sources":["../../../../src/commands/cuneiform/summary/stop.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,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EACL,oBAAoB,EAGpB,qBAAqB,GACtB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAqB,MAAM,8CAA8C,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,CAAC,UAAU,CAAC,uBAAuB,CAAC,EAAE,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;YACvF,EAAE,GAAG,EAAE,QAAQ,CAAC,UAAU,CAAC,sBAAsB,CAAC,EAAE,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;SACtF,CAAC;QACF,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YACrC,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,sBAAsB,CAAC;YAClD,OAAO,EAAE,cAAc;SACxB,CAAC,CAAC;IACL,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { CuneiformCommand } from '../../../base/cuneiform-command.js';
|
|
2
|
+
import type { OrgContextResult, UserIdentityResult, PrerequisitesResult, PermissionSetAssignmentResult, ConfigProfileResult, ReadinessResult, ResolutionGuidanceItem, ConfigurationActionResult, ConfigurationResult, LinksResult, UserDetailsResult } from '../../../models/user-details-types.js';
|
|
3
|
+
import { type UserInfo, type UserReadiness } from '../../../services/UserReadinessService.js';
|
|
4
|
+
import { type OrgIdentity } from '../../../services/OrgInfoService.js';
|
|
5
|
+
export type { OrgContextResult, UserIdentityResult, PrerequisitesResult, PermissionSetAssignmentResult, ConfigProfileResult, ReadinessResult, ResolutionGuidanceItem, ConfigurationActionResult, ConfigurationResult, LinksResult, UserDetailsResult, };
|
|
6
|
+
/**
|
|
7
|
+
* Displays authenticated user context and Cuneiform readiness status.
|
|
8
|
+
*
|
|
9
|
+
* Use this command to:
|
|
10
|
+
* - Verify user identity (ID, username, email, profile, role)
|
|
11
|
+
* - Check required Cuneiform permission set assignments
|
|
12
|
+
* - Validate Configuration Profile settings for API-only profiling
|
|
13
|
+
* - Diagnose readiness issues before running other Cuneiform commands
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```bash
|
|
17
|
+
* # Display user details and readiness status
|
|
18
|
+
* sf cuneiform user details --target-org myOrg
|
|
19
|
+
*
|
|
20
|
+
* # Output as JSON for programmatic use
|
|
21
|
+
* sf cuneiform user details --target-org myOrg --json
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export default class Details extends CuneiformCommand<UserDetailsResult> {
|
|
25
|
+
static readonly summary: string;
|
|
26
|
+
static readonly description: string;
|
|
27
|
+
static readonly examples: string[];
|
|
28
|
+
static readonly flags: {
|
|
29
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
30
|
+
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
31
|
+
configure: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
32
|
+
unconfigure: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
33
|
+
'dry-run': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
34
|
+
};
|
|
35
|
+
protected static skipAccessGate: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Builds the command result from service data.
|
|
38
|
+
*/
|
|
39
|
+
static buildResult(userInfo: UserInfo, readiness: UserReadiness, orgIdentity: OrgIdentity | undefined, instanceUrl: string): UserDetailsResult;
|
|
40
|
+
/**
|
|
41
|
+
* Builds resolution guidance items from readiness state.
|
|
42
|
+
* Extracted from buildResult to reduce cyclomatic complexity.
|
|
43
|
+
*/
|
|
44
|
+
private static buildResolutionGuidance;
|
|
45
|
+
/**
|
|
46
|
+
* Maps the service-level UserConfigurationResult to the command-level ConfigurationResult.
|
|
47
|
+
*/
|
|
48
|
+
private static mapConfigurationResult;
|
|
49
|
+
/**
|
|
50
|
+
* Executes the user details command.
|
|
51
|
+
*
|
|
52
|
+
* @returns UserDetailsResult with user identity and readiness status
|
|
53
|
+
*/
|
|
54
|
+
run(): Promise<UserDetailsResult>;
|
|
55
|
+
/**
|
|
56
|
+
* Establishes connection to the Salesforce org and retrieves the current user ID.
|
|
57
|
+
* Wraps the identity call with a user-friendly error message on failure.
|
|
58
|
+
*/
|
|
59
|
+
private connectToOrg;
|
|
60
|
+
/**
|
|
61
|
+
* Fetches org identity, user info, and readiness in parallel.
|
|
62
|
+
* Wraps the API calls with a user-friendly error message on failure.
|
|
63
|
+
*/
|
|
64
|
+
private fetchOrgData;
|
|
65
|
+
/**
|
|
66
|
+
* Runs the --configure phase: assigns permission sets and enables API-only profiling.
|
|
67
|
+
*/
|
|
68
|
+
private runConfigurePhase;
|
|
69
|
+
/**
|
|
70
|
+
* Runs the --unconfigure phase: unassigns permission sets and disables API-only profiling.
|
|
71
|
+
*/
|
|
72
|
+
private runUnconfigurePhase;
|
|
73
|
+
}
|