@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,135 @@
|
|
|
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 { ProfileRequestService } from '../../../services/ProfileRequestService.js';
|
|
13
|
+
import { OrgResetOperation, DEFAULT_NUT_PATTERN, } from '../../../operations/OrgResetOperation.js';
|
|
14
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
15
|
+
const messages = Messages.loadMessages('@peernova/cuneiform-sf', 'org.reset');
|
|
16
|
+
/**
|
|
17
|
+
* Resets a Salesforce org by removing Cuneiform test data created by NUT tests.
|
|
18
|
+
*
|
|
19
|
+
* Purges definitions matching a name pattern (default: [NUT-*]),
|
|
20
|
+
* cancels active profiling requests, and deletes terminal requests.
|
|
21
|
+
* Use this command to restore a scratch org to a clean state.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```bash
|
|
25
|
+
* # Reset org with default pattern
|
|
26
|
+
* sf cuneiform org reset --target-org myOrg
|
|
27
|
+
*
|
|
28
|
+
* # Dry-run preview
|
|
29
|
+
* sf cuneiform org reset --target-org myOrg --dry-run
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
// eslint-disable-next-line sf-plugin/only-extend-SfCommand -- CuneiformCommand extends SfCommand with shared access gate logic
|
|
33
|
+
export default class OrgReset extends CuneiformCommand {
|
|
34
|
+
static summary = messages.getMessage('summary');
|
|
35
|
+
static description = messages.getMessage('description');
|
|
36
|
+
static examples = messages.getMessages('examples');
|
|
37
|
+
// eslint-disable-next-line sf-plugin/spread-base-flags -- CuneiformCommand has no additional flags to spread
|
|
38
|
+
static flags = {
|
|
39
|
+
'target-org': Flags.requiredOrg({
|
|
40
|
+
char: 'o',
|
|
41
|
+
required: true,
|
|
42
|
+
}),
|
|
43
|
+
'api-version': Flags.orgApiVersion(),
|
|
44
|
+
pattern: Flags.string({
|
|
45
|
+
summary: messages.getMessage('flags.pattern.summary'),
|
|
46
|
+
char: 'p',
|
|
47
|
+
default: DEFAULT_NUT_PATTERN,
|
|
48
|
+
}),
|
|
49
|
+
'dry-run': Flags.boolean({
|
|
50
|
+
summary: messages.getMessage('flags.dry-run.summary'),
|
|
51
|
+
char: 'd',
|
|
52
|
+
default: false,
|
|
53
|
+
}),
|
|
54
|
+
'no-prompt': Flags.boolean({
|
|
55
|
+
summary: messages.getMessage('flags.no-prompt.summary'),
|
|
56
|
+
char: 'n',
|
|
57
|
+
default: false,
|
|
58
|
+
}),
|
|
59
|
+
};
|
|
60
|
+
static hidden = true;
|
|
61
|
+
/**
|
|
62
|
+
* This command skips the access gate because it is a developer utility
|
|
63
|
+
* for cleaning up NUT test data, not a user-facing profiling command.
|
|
64
|
+
*/
|
|
65
|
+
static skipAccessGate = true;
|
|
66
|
+
async run() {
|
|
67
|
+
const { flags } = await this.parse(OrgReset);
|
|
68
|
+
const { soqlAdapter, restAdapter } = await this.initConnection(flags);
|
|
69
|
+
const definitionService = new ProfilingDefinitionService({ soqlAdapter, restAdapter });
|
|
70
|
+
const requestService = new ProfileRequestService({ soqlAdapter, restAdapter });
|
|
71
|
+
const operation = new OrgResetOperation(definitionService, requestService);
|
|
72
|
+
const pattern = flags['pattern'];
|
|
73
|
+
const dryRun = flags['dry-run'];
|
|
74
|
+
this.spinner.start(messages.getMessage('spinner.querying', [pattern]));
|
|
75
|
+
const result = await operation.execute({
|
|
76
|
+
targetOrg: flags['target-org'].getUsername() ?? '',
|
|
77
|
+
pattern,
|
|
78
|
+
dryRun,
|
|
79
|
+
noPrompt: flags['no-prompt'],
|
|
80
|
+
onProgress: (event) => {
|
|
81
|
+
this.handleProgress(event);
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
this.spinner.stop();
|
|
85
|
+
if (!result.success) {
|
|
86
|
+
this.error(messages.getMessage('errors.operationFailed', [result.message ?? 'Unknown error']));
|
|
87
|
+
}
|
|
88
|
+
this.renderResult(result.data);
|
|
89
|
+
return result.data;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Updates the spinner with progress events.
|
|
93
|
+
*/
|
|
94
|
+
handleProgress(event) {
|
|
95
|
+
switch (event.step) {
|
|
96
|
+
case 'cancel-requests':
|
|
97
|
+
this.spinner.start(messages.getMessage('spinner.cancelling'));
|
|
98
|
+
break;
|
|
99
|
+
case 'delete-requests':
|
|
100
|
+
this.spinner.start(messages.getMessage('spinner.deleting-requests'));
|
|
101
|
+
break;
|
|
102
|
+
case 'delete-definitions':
|
|
103
|
+
if (event.count !== undefined && event.count > 0) {
|
|
104
|
+
this.spinner.start(messages.getMessage('spinner.deleting-definitions', [event.count]));
|
|
105
|
+
}
|
|
106
|
+
break;
|
|
107
|
+
default:
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Renders the operation result as human-readable output.
|
|
113
|
+
*/
|
|
114
|
+
renderResult(result) {
|
|
115
|
+
if (result.definitions.total === 0 && result.requests.total === 0) {
|
|
116
|
+
this.log(messages.getMessage('info.already-clean', [result.pattern]));
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
if (result.dryRun) {
|
|
120
|
+
this.log(messages.getMessage('info.dry-run-header'));
|
|
121
|
+
}
|
|
122
|
+
this.log('');
|
|
123
|
+
this.log(messages.getMessage('info.summary'));
|
|
124
|
+
this.log('');
|
|
125
|
+
// Definitions
|
|
126
|
+
const defLabel = result.dryRun ? 'Would delete' : 'Deleted';
|
|
127
|
+
this.log(` Definitions: ${defLabel}: ${result.definitions.deleted} | Skipped: ${result.definitions.skipped} | Failed: ${result.definitions.failed} | Total: ${result.definitions.total}`);
|
|
128
|
+
// Requests
|
|
129
|
+
const reqCancelLabel = result.dryRun ? 'Would cancel' : 'Cancelled';
|
|
130
|
+
const reqDeleteLabel = result.dryRun ? 'Would delete' : 'Deleted';
|
|
131
|
+
this.log(` Requests: ${reqCancelLabel}: ${result.requests.cancelled} | ${reqDeleteLabel}: ${result.requests.deleted} | Failed: ${result.requests.failed} | Total: ${result.requests.total}`);
|
|
132
|
+
this.log('');
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=reset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reset.js","sourceRoot":"","sources":["../../../../src/commands/cuneiform/org/reset.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,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EACL,iBAAiB,EACjB,mBAAmB,GAGpB,MAAM,0CAA0C,CAAC;AAElD,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,wBAAwB,EAAE,WAAW,CAAC,CAAC;AAI9E;;;;;;;;;;;;;;;GAeG;AACH,+HAA+H;AAC/H,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,gBAAgC;IAC7D,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,CAAC,UAAU,CAAC,CAAC;IAEnE,6GAA6G;IACtG,MAAM,CAAU,KAAK,GAAG;QAC7B,YAAY,EAAE,KAAK,CAAC,WAAW,CAAC;YAC9B,IAAI,EAAE,GAAG;YACT,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,aAAa,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AC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC;QAClE,IAAI,CAAC,GAAG,CACN,mBAAmB,cAAc,KAAK,MAAM,CAAC,QAAQ,CAAC,SAAS,MAAM,cAAc,KAAK,MAAM,CAAC,QAAQ,CAAC,OAAO,cAAc,MAAM,CAAC,QAAQ,CAAC,MAAM,aAAa,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CACxL,CAAC;QACF,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACf,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { CuneiformCommand } from '../../../../base/cuneiform-command.js';
|
|
2
|
+
import type { IProfileRequest } from '../../../../models/profile-request-types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Command result type for JSON output.
|
|
5
|
+
*/
|
|
6
|
+
export type ProfileRequestCancelCommandResult = {
|
|
7
|
+
/** Whether the operation was successful */
|
|
8
|
+
success: boolean;
|
|
9
|
+
/** Number of requests cancelled */
|
|
10
|
+
cancelled: number;
|
|
11
|
+
/** Number of requests that failed to cancel */
|
|
12
|
+
failed: number;
|
|
13
|
+
/** Total cancellable requests found */
|
|
14
|
+
totalCancellable: number;
|
|
15
|
+
/** Whether this was a dry run */
|
|
16
|
+
dryRun: boolean;
|
|
17
|
+
/** Whether the operation was cancelled by the user */
|
|
18
|
+
userCancelled?: boolean;
|
|
19
|
+
/** Error message if failed */
|
|
20
|
+
error?: string;
|
|
21
|
+
/** Cancelled request details (for JSON output) */
|
|
22
|
+
requests?: IProfileRequest[];
|
|
23
|
+
/** Failed request details (for JSON output) */
|
|
24
|
+
failures?: Array<{
|
|
25
|
+
id: string;
|
|
26
|
+
error: string;
|
|
27
|
+
}>;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Cancels profiling requests in a Salesforce org.
|
|
31
|
+
*
|
|
32
|
+
* Cancels queued profiling requests. Canceled, completed, and rejected
|
|
33
|
+
* requests cannot be canceled.
|
|
34
|
+
*/
|
|
35
|
+
export default class ProfileRequestCancel extends CuneiformCommand<ProfileRequestCancelCommandResult> {
|
|
36
|
+
static readonly summary: string;
|
|
37
|
+
static readonly description: string;
|
|
38
|
+
static readonly examples: string[];
|
|
39
|
+
static readonly flags: {
|
|
40
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
41
|
+
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
42
|
+
all: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
43
|
+
'request-ids': 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 profile request cancel command.
|
|
53
|
+
*/
|
|
54
|
+
run(): Promise<ProfileRequestCancelCommandResult>;
|
|
55
|
+
/**
|
|
56
|
+
* Displays cancel results.
|
|
57
|
+
*/
|
|
58
|
+
private displayResults;
|
|
59
|
+
}
|
|
@@ -0,0 +1,202 @@
|
|
|
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 { ProfileRequestService } from '../../../../services/ProfileRequestService.js';
|
|
12
|
+
import { ProfileRequestCancelOperation, ProfileRequestCancelErrorCodes, } from '../../../../operations/ProfileRequestCancelOperation.js';
|
|
13
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
14
|
+
const messages = Messages.loadMessages('@peernova/cuneiform-sf', 'profile.request.cancel');
|
|
15
|
+
/**
|
|
16
|
+
* Cancels profiling requests in a Salesforce org.
|
|
17
|
+
*
|
|
18
|
+
* Cancels queued profiling requests. Canceled, completed, and rejected
|
|
19
|
+
* requests cannot be canceled.
|
|
20
|
+
*/
|
|
21
|
+
// eslint-disable-next-line sf-plugin/only-extend-SfCommand -- CuneiformCommand extends SfCommand with shared access gate logic
|
|
22
|
+
export default class ProfileRequestCancel extends CuneiformCommand {
|
|
23
|
+
static summary = messages.getMessage('summary');
|
|
24
|
+
static description = messages.getMessage('description');
|
|
25
|
+
static examples = messages.getMessages('examples');
|
|
26
|
+
// eslint-disable-next-line sf-plugin/spread-base-flags -- CuneiformCommand has no additional flags to spread
|
|
27
|
+
static flags = {
|
|
28
|
+
'target-org': Flags.requiredOrg({
|
|
29
|
+
summary: messages.getMessage('flags.target-org.summary'),
|
|
30
|
+
char: 'o',
|
|
31
|
+
required: true,
|
|
32
|
+
}),
|
|
33
|
+
'api-version': Flags.orgApiVersion(),
|
|
34
|
+
all: Flags.boolean({
|
|
35
|
+
summary: messages.getMessage('flags.all.summary'),
|
|
36
|
+
char: 'a',
|
|
37
|
+
exclusive: ['request-ids'],
|
|
38
|
+
}),
|
|
39
|
+
'request-ids': Flags.string({
|
|
40
|
+
summary: messages.getMessage('flags.request-ids.summary'),
|
|
41
|
+
char: 'i',
|
|
42
|
+
multiple: true,
|
|
43
|
+
exclusive: ['all'],
|
|
44
|
+
}),
|
|
45
|
+
'dry-run': Flags.boolean({
|
|
46
|
+
summary: messages.getMessage('flags.dry-run.summary'),
|
|
47
|
+
char: 'd',
|
|
48
|
+
default: false,
|
|
49
|
+
}),
|
|
50
|
+
'no-prompt': Flags.boolean({
|
|
51
|
+
summary: messages.getMessage('flags.no-prompt.summary'),
|
|
52
|
+
char: 'y',
|
|
53
|
+
default: false,
|
|
54
|
+
}),
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Maps error codes to i18n message keys.
|
|
58
|
+
*/
|
|
59
|
+
static ERROR_CODE_MAP = {
|
|
60
|
+
[ProfileRequestCancelErrorCodes.INVALID_IDS]: 'errors.invalidIds',
|
|
61
|
+
[ProfileRequestCancelErrorCodes.NO_CANCELLABLE]: 'errors.noCancellable',
|
|
62
|
+
[ProfileRequestCancelErrorCodes.CANCEL_FAILED]: 'errors.cancelFailed',
|
|
63
|
+
[ProfileRequestCancelErrorCodes.PARTIAL_FAILURE]: 'errors.partialFailure',
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Executes the profile request cancel command.
|
|
67
|
+
*/
|
|
68
|
+
async run() {
|
|
69
|
+
const { flags } = await this.parse(ProfileRequestCancel);
|
|
70
|
+
const targetOrg = flags['target-org'].getUsername();
|
|
71
|
+
if (!targetOrg) {
|
|
72
|
+
this.error(messages.getMessage('errors.noTargetOrg'));
|
|
73
|
+
}
|
|
74
|
+
const dryRun = flags['dry-run'];
|
|
75
|
+
const noPrompt = flags['no-prompt'];
|
|
76
|
+
// Initialize services
|
|
77
|
+
const { soqlAdapter, restAdapter } = await this.initConnection(flags);
|
|
78
|
+
const service = new ProfileRequestService({ soqlAdapter, restAdapter });
|
|
79
|
+
const operation = new ProfileRequestCancelOperation(service);
|
|
80
|
+
// Parse request IDs
|
|
81
|
+
const requestIds = ProfileRequestCancel.parseMultiValueFlag(flags['request-ids']);
|
|
82
|
+
// Validate mutually exclusive flags
|
|
83
|
+
const hasAll = flags.all === true;
|
|
84
|
+
const hasIds = requestIds !== undefined && requestIds.length > 0;
|
|
85
|
+
if (hasAll && hasIds) {
|
|
86
|
+
this.error(messages.getMessage('errors.mutuallyExclusive'));
|
|
87
|
+
}
|
|
88
|
+
if (!hasAll && !hasIds) {
|
|
89
|
+
this.error(messages.getMessage('errors.noSelection'));
|
|
90
|
+
}
|
|
91
|
+
// Build operation options
|
|
92
|
+
const operationOptions = {
|
|
93
|
+
all: flags.all,
|
|
94
|
+
requestIds,
|
|
95
|
+
dryRun,
|
|
96
|
+
noPrompt,
|
|
97
|
+
onCancellableFound: (count) => {
|
|
98
|
+
this.spinner.stop(`${count} cancellable request(s) 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
|
+
// Execute
|
|
112
|
+
const modeText = dryRun ? '(dry run) ' : '';
|
|
113
|
+
this.log(`Checking for cancellable profiling requests ${modeText}...`);
|
|
114
|
+
this.spinner.start('Retrieving cancellable requests');
|
|
115
|
+
const result = await operation.execute(operationOptions);
|
|
116
|
+
this.spinner.stop();
|
|
117
|
+
// Handle no cancellable requests
|
|
118
|
+
if (!result.success && result.errorCode === ProfileRequestCancelErrorCodes.NO_CANCELLABLE) {
|
|
119
|
+
this.log('');
|
|
120
|
+
this.log(messages.getMessage('output.noCancellable'));
|
|
121
|
+
return {
|
|
122
|
+
success: true,
|
|
123
|
+
cancelled: 0,
|
|
124
|
+
failed: 0,
|
|
125
|
+
totalCancellable: 0,
|
|
126
|
+
dryRun,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
// Handle user cancellation
|
|
130
|
+
if (result.success && result.metadata?.userCancelled) {
|
|
131
|
+
this.log('');
|
|
132
|
+
this.log(messages.getMessage('output.userCancelled'));
|
|
133
|
+
return {
|
|
134
|
+
success: true,
|
|
135
|
+
cancelled: 0,
|
|
136
|
+
failed: 0,
|
|
137
|
+
totalCancellable: result.data.totalCancellable,
|
|
138
|
+
dryRun,
|
|
139
|
+
userCancelled: true,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
// Handle other failures
|
|
143
|
+
if (!result.success) {
|
|
144
|
+
const errorMessage = ProfileRequestCancel.resolveErrorMessage(ProfileRequestCancel.ERROR_CODE_MAP, result.errorCode, result.message ?? 'Unknown error', messages);
|
|
145
|
+
this.error(errorMessage, { code: result.errorCode });
|
|
146
|
+
}
|
|
147
|
+
const data = result.data;
|
|
148
|
+
// Display results
|
|
149
|
+
this.displayResults(data, dryRun);
|
|
150
|
+
return {
|
|
151
|
+
success: true,
|
|
152
|
+
cancelled: data.cancelled.length,
|
|
153
|
+
failed: data.failed.length,
|
|
154
|
+
totalCancellable: data.totalCancellable,
|
|
155
|
+
dryRun,
|
|
156
|
+
requests: data.cancelled,
|
|
157
|
+
failures: data.failed,
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Displays cancel results.
|
|
162
|
+
*/
|
|
163
|
+
displayResults(data, dryRun) {
|
|
164
|
+
this.log('');
|
|
165
|
+
if (dryRun) {
|
|
166
|
+
this.log(messages.getMessage('output.dryRunTitle'));
|
|
167
|
+
this.log('');
|
|
168
|
+
// Show table only for dry-run preview
|
|
169
|
+
if (data.cancelled.length > 0) {
|
|
170
|
+
this.table({
|
|
171
|
+
data: data.cancelled.map((r) => ({
|
|
172
|
+
name: r.name,
|
|
173
|
+
status: r.status,
|
|
174
|
+
object: r.objectName,
|
|
175
|
+
definition: r.definitionName,
|
|
176
|
+
})),
|
|
177
|
+
columns: [
|
|
178
|
+
{ key: 'name', name: 'NAME' },
|
|
179
|
+
{ key: 'status', name: 'STATUS' },
|
|
180
|
+
{ key: 'object', name: 'OBJECT' },
|
|
181
|
+
{ key: 'definition', name: 'DEFINITION' },
|
|
182
|
+
],
|
|
183
|
+
});
|
|
184
|
+
this.log('');
|
|
185
|
+
}
|
|
186
|
+
this.log(messages.getMessage('output.dryRunSummary', [String(data.cancelled.length)]));
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
this.log(messages.getMessage('output.cancelled', [String(data.cancelled.length)]));
|
|
190
|
+
}
|
|
191
|
+
// Show failed requests
|
|
192
|
+
if (data.failed.length > 0) {
|
|
193
|
+
this.log('');
|
|
194
|
+
this.log(messages.getMessage('output.failedHeader'));
|
|
195
|
+
for (const f of data.failed) {
|
|
196
|
+
this.log(` ${f.id}: ${f.error}`);
|
|
197
|
+
}
|
|
198
|
+
this.warn(messages.getMessage('errors.partialFailure', [String(data.cancelled.length), String(data.totalCancellable)]));
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=cancel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancel.js","sourceRoot":"","sources":["../../../../../src/commands/cuneiform/profile/request/cancel.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,uCAAuC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,EACL,6BAA6B,EAE7B,8BAA8B,GAC/B,MAAM,yDAAyD,CAAC;AAGjE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,wBAAwB,EAAE,wBAAwB,CAAC,CAAC;AA0B3F;;;;;GAKG;AACH,+HAA+H;AAC/H,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,gBAAmD;IAC5F,M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AC,EAAE,CAAC,CAAC;YACf,CAAC;YAED,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACzF,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACrF,CAAC;QAED,uBAAuB;QACvB,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3B,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACb,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC,CAAC;YACrD,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;gBAC5B,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;YACpC,CAAC;YACD,IAAI,CAAC,IAAI,CACP,QAAQ,CAAC,UAAU,CAAC,uBAAuB,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAC7G,CAAC;QACJ,CAAC;IACH,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { CuneiformCommand } from '../../../../base/cuneiform-command.js';
|
|
2
|
+
import type { IProfileRequest } from '../../../../models/profile-request-types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Command result type for JSON output.
|
|
5
|
+
*/
|
|
6
|
+
export type ProfileRequestDeleteCommandResult = {
|
|
7
|
+
/** Whether the operation was successful */
|
|
8
|
+
success: boolean;
|
|
9
|
+
/** Number of requests deleted */
|
|
10
|
+
deleted: number;
|
|
11
|
+
/** Number of requests that failed to delete */
|
|
12
|
+
failed: number;
|
|
13
|
+
/** Total deletable requests found */
|
|
14
|
+
totalDeletable: number;
|
|
15
|
+
/** Whether this was a dry run */
|
|
16
|
+
dryRun: boolean;
|
|
17
|
+
/** Whether the operation was cancelled by the user */
|
|
18
|
+
userCancelled?: boolean;
|
|
19
|
+
/** Error message if failed */
|
|
20
|
+
error?: string;
|
|
21
|
+
/** Deleted request details (for JSON output) */
|
|
22
|
+
requests?: IProfileRequest[];
|
|
23
|
+
/** Failed request details (for JSON output) */
|
|
24
|
+
failures?: Array<{
|
|
25
|
+
id: string;
|
|
26
|
+
error: string;
|
|
27
|
+
}>;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Permanently deletes profiling requests from a Salesforce org.
|
|
31
|
+
*
|
|
32
|
+
* Deletes canceled or rejected profiling requests. Queued and completed
|
|
33
|
+
* requests are protected — this is an irreversible operation.
|
|
34
|
+
*/
|
|
35
|
+
export default class ProfileRequestDelete extends CuneiformCommand<ProfileRequestDeleteCommandResult> {
|
|
36
|
+
static readonly summary: string;
|
|
37
|
+
static readonly description: string;
|
|
38
|
+
static readonly examples: string[];
|
|
39
|
+
static readonly flags: {
|
|
40
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
41
|
+
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
42
|
+
all: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
43
|
+
'request-ids': 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 profile request delete command.
|
|
53
|
+
*/
|
|
54
|
+
run(): Promise<ProfileRequestDeleteCommandResult>;
|
|
55
|
+
/**
|
|
56
|
+
* Displays delete results.
|
|
57
|
+
*/
|
|
58
|
+
private displayResults;
|
|
59
|
+
}
|