@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,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure rendering utilities for the business process grid.
|
|
3
|
+
*
|
|
4
|
+
* Converts business process data with record age distribution into table-ready
|
|
5
|
+
* row objects for makeTable() rendering. Reuses the record-age-grid columns
|
|
6
|
+
* and the filled/empty circle metaphor from availability-grid.ts.
|
|
7
|
+
*
|
|
8
|
+
* Designed for reuse across commands — any command that needs to display
|
|
9
|
+
* business processes with year-level record existence can use this component.
|
|
10
|
+
*
|
|
11
|
+
* @module utils/formatting/business-process-grid
|
|
12
|
+
*/
|
|
13
|
+
import type { RecordAgeDistribution, YearRecordAge } from '../../services/ObjectDescribeService.js';
|
|
14
|
+
/**
|
|
15
|
+
* Business process entry for the grid display.
|
|
16
|
+
* Decoupled from service types so any command can construct this.
|
|
17
|
+
*/
|
|
18
|
+
export type BusinessProcessGridEntry = {
|
|
19
|
+
/** Process name */
|
|
20
|
+
name: string;
|
|
21
|
+
/** Whether the process is active */
|
|
22
|
+
isActive: boolean;
|
|
23
|
+
/** Number of record types using this process */
|
|
24
|
+
recordTypeCount: number;
|
|
25
|
+
/** Per-process record age distribution (optional — omit for processes without data) */
|
|
26
|
+
recordAgeDistribution?: RecordAgeDistribution;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Builds column definitions for the business process grid table.
|
|
30
|
+
*
|
|
31
|
+
* Returns: Process Name, Active, Record Types, then year columns + Oldest
|
|
32
|
+
* from the record age grid.
|
|
33
|
+
*
|
|
34
|
+
* @param years - The year entries (used to generate dynamic year columns)
|
|
35
|
+
* @returns Column definitions for makeTable()
|
|
36
|
+
*/
|
|
37
|
+
export declare function buildBusinessProcessColumns(years: readonly YearRecordAge[]): Array<{
|
|
38
|
+
key: string;
|
|
39
|
+
name: string;
|
|
40
|
+
}>;
|
|
41
|
+
/**
|
|
42
|
+
* Builds table-ready row data from business process entries.
|
|
43
|
+
*
|
|
44
|
+
* Each process becomes one row with its metadata columns and merged
|
|
45
|
+
* record age columns (year symbols + oldest date).
|
|
46
|
+
*
|
|
47
|
+
* @param processes - Array of business process entries with optional age data
|
|
48
|
+
* @param years - The year entries (used to fill em dashes for processes without data)
|
|
49
|
+
* @returns Array of row objects suitable for makeTable()
|
|
50
|
+
*/
|
|
51
|
+
export declare function buildBusinessProcessTableData(processes: readonly BusinessProcessGridEntry[], years?: readonly YearRecordAge[]): Array<Record<string, string>>;
|
|
@@ -0,0 +1,58 @@
|
|
|
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 { buildRecordAgeColumns, buildRecordAgeTableData } from './record-age-grid.js';
|
|
9
|
+
import { DATA_NA } from './availability-grid.js';
|
|
10
|
+
/**
|
|
11
|
+
* Builds column definitions for the business process grid table.
|
|
12
|
+
*
|
|
13
|
+
* Returns: Process Name, Active, Record Types, then year columns + Oldest
|
|
14
|
+
* from the record age grid.
|
|
15
|
+
*
|
|
16
|
+
* @param years - The year entries (used to generate dynamic year columns)
|
|
17
|
+
* @returns Column definitions for makeTable()
|
|
18
|
+
*/
|
|
19
|
+
export function buildBusinessProcessColumns(years) {
|
|
20
|
+
const columns = [
|
|
21
|
+
{ key: 'name', name: 'Process Name' },
|
|
22
|
+
{ key: 'active', name: 'Active' },
|
|
23
|
+
{ key: 'recordTypes', name: 'Record Types' },
|
|
24
|
+
];
|
|
25
|
+
// Append year + oldest columns from the record-age-grid component
|
|
26
|
+
columns.push(...buildRecordAgeColumns(years));
|
|
27
|
+
return columns;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Builds table-ready row data from business process entries.
|
|
31
|
+
*
|
|
32
|
+
* Each process becomes one row with its metadata columns and merged
|
|
33
|
+
* record age columns (year symbols + oldest date).
|
|
34
|
+
*
|
|
35
|
+
* @param processes - Array of business process entries with optional age data
|
|
36
|
+
* @param years - The year entries (used to fill em dashes for processes without data)
|
|
37
|
+
* @returns Array of row objects suitable for makeTable()
|
|
38
|
+
*/
|
|
39
|
+
export function buildBusinessProcessTableData(processes, years = []) {
|
|
40
|
+
return processes.map((process) => {
|
|
41
|
+
const row = {
|
|
42
|
+
name: process.name,
|
|
43
|
+
active: process.isActive ? 'Yes' : 'No',
|
|
44
|
+
recordTypes: String(process.recordTypeCount),
|
|
45
|
+
};
|
|
46
|
+
if (process.recordAgeDistribution) {
|
|
47
|
+
// Merge year columns from record-age-grid
|
|
48
|
+
const ageRow = buildRecordAgeTableData(process.recordAgeDistribution)[0];
|
|
49
|
+
Object.assign(row, ageRow);
|
|
50
|
+
}
|
|
51
|
+
else if (years.length > 0) {
|
|
52
|
+
// Show em dash only in the oldest column for processes without data
|
|
53
|
+
row.oldest = DATA_NA;
|
|
54
|
+
}
|
|
55
|
+
return row;
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=business-process-grid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"business-process-grid.js","sourceRoot":"","sources":["../../../src/utils/formatting/business-process-grid.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAgBH,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACtF,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAiBjD;;;;;;;;GAQG;AACH,MAAM,UAAU,2BAA2B,CAAC,KAA+B;IACzE,MAAM,OAAO,GAAyC;QACpD,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE;QACrC,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;QACjC,EAAE,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,cAAc,EAAE;KAC7C,CAAC;IAEF,kEAAkE;IAClE,OAAO,CAAC,IAAI,CAAC,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC;IAE9C,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,6BAA6B,CAC3C,SAA8C,EAC9C,QAAkC,EAAE;IAEpC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;QAC/B,MAAM,GAAG,GAA2B;YAClC,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;YACvC,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC;SAC7C,CAAC;QAEF,IAAI,OAAO,CAAC,qBAAqB,EAAE,CAAC;YAClC,0CAA0C;YAC1C,MAAM,MAAM,GAAG,uBAAuB,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC;YACzE,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QAC7B,CAAC;aAAM,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC5B,oEAAoE;YACpE,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC;QACvB,CAAC;QAED,OAAO,GAAG,CAAC;IACb,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import type { StatusType } from './indicators.js';
|
|
2
|
+
/**
|
|
3
|
+
* A key-value pair for display in a summary box.
|
|
4
|
+
*/
|
|
5
|
+
export type SummaryEntry = {
|
|
6
|
+
/** The label/key text. */
|
|
7
|
+
readonly key: string;
|
|
8
|
+
/** The value to display. */
|
|
9
|
+
readonly value: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Options for rendering a summary box.
|
|
13
|
+
*/
|
|
14
|
+
export type SummaryBoxOptions = {
|
|
15
|
+
/** The section title displayed in the header. */
|
|
16
|
+
readonly title: string;
|
|
17
|
+
/** Key-value entries to display in the box. */
|
|
18
|
+
readonly entries: readonly SummaryEntry[];
|
|
19
|
+
/** Width to pad keys to for column alignment. Default: 20. */
|
|
20
|
+
readonly keyWidth?: number;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Renders a summary box with a header, key-value entries, and a separator.
|
|
24
|
+
*
|
|
25
|
+
* Produces a structured block of output suitable for displaying command
|
|
26
|
+
* results, org details, or object metadata. Empty entries produce
|
|
27
|
+
* a header and separator with no key-value lines between them.
|
|
28
|
+
*
|
|
29
|
+
* @param options - The summary box configuration
|
|
30
|
+
* @returns A multi-line formatted string
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* renderSummaryBox({ title: 'Org Details', entries: [{ key: 'Username', value: 'admin@example.com' }] })
|
|
34
|
+
*/
|
|
35
|
+
export declare function renderSummaryBox(options: SummaryBoxOptions): string;
|
|
36
|
+
/**
|
|
37
|
+
* Logs a summary box to the console, line by line.
|
|
38
|
+
*
|
|
39
|
+
* Wraps {@link renderSummaryBox} with the common pattern of splitting
|
|
40
|
+
* the multi-line output and logging each line individually. Prepends
|
|
41
|
+
* a blank line for visual separation from preceding output.
|
|
42
|
+
*
|
|
43
|
+
* @param log - The logging function (typically `this.log.bind(this)`)
|
|
44
|
+
* @param options - The summary box configuration
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* displaySummaryBox(this.log.bind(this), {
|
|
49
|
+
* title: 'Summary',
|
|
50
|
+
* entries: [
|
|
51
|
+
* { key: 'Deleted', value: '5' },
|
|
52
|
+
* { key: 'Failed', value: '0' },
|
|
53
|
+
* ],
|
|
54
|
+
* });
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export declare function displaySummaryBox(log: (msg: string) => void, options: SummaryBoxOptions): void;
|
|
58
|
+
/**
|
|
59
|
+
* Options for rendering a completion message.
|
|
60
|
+
*/
|
|
61
|
+
export type CompletionMessageOptions = {
|
|
62
|
+
/** The status type for the message icon. */
|
|
63
|
+
readonly status: StatusType;
|
|
64
|
+
/** The primary message text. */
|
|
65
|
+
readonly message: string;
|
|
66
|
+
/** Optional detail lines displayed below the message. */
|
|
67
|
+
readonly details?: readonly string[];
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Renders a completion message with a status symbol and optional detail lines.
|
|
71
|
+
*
|
|
72
|
+
* Used at the end of command execution to indicate success, failure, or
|
|
73
|
+
* warning outcomes with structured details.
|
|
74
|
+
*
|
|
75
|
+
* @param options - The completion message configuration
|
|
76
|
+
* @returns A formatted string with status symbol, message, and optional details
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* renderCompletionMessage({ status: 'success', message: 'Exported 42 definitions' })
|
|
80
|
+
*/
|
|
81
|
+
export declare function renderCompletionMessage(options: CompletionMessageOptions): string;
|
|
82
|
+
/**
|
|
83
|
+
* Options for rendering a warning block.
|
|
84
|
+
*/
|
|
85
|
+
export type WarningBlockOptions = {
|
|
86
|
+
/** The warning title text. */
|
|
87
|
+
readonly title: string;
|
|
88
|
+
/** Warning detail items displayed as a bullet list. */
|
|
89
|
+
readonly items: readonly string[];
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Renders a warning block with a header and bullet list of items.
|
|
93
|
+
*
|
|
94
|
+
* Used to display non-fatal warnings that the user should be aware of
|
|
95
|
+
* but that don't prevent command completion.
|
|
96
|
+
*
|
|
97
|
+
* @param options - The warning block configuration
|
|
98
|
+
* @returns A formatted warning string, or an empty string if no items
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* renderWarningBlock({ title: 'Warnings', items: ['3 objects have no record types'] })
|
|
102
|
+
*/
|
|
103
|
+
export declare function renderWarningBlock(options: WarningBlockOptions): string;
|
|
104
|
+
/**
|
|
105
|
+
* Options for rendering a contextual header.
|
|
106
|
+
*/
|
|
107
|
+
export type ContextualHeaderOptions = {
|
|
108
|
+
/** The human-readable command title (e.g., "User Details", "Org Details"). */
|
|
109
|
+
readonly commandTitle: string;
|
|
110
|
+
/** The authenticated username. */
|
|
111
|
+
readonly username: string;
|
|
112
|
+
/** The org name (omitted from output if undefined or empty). */
|
|
113
|
+
readonly orgName?: string;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Renders a contextual header line for CLI command output.
|
|
117
|
+
*
|
|
118
|
+
* Produces a single line that frames the command output with context:
|
|
119
|
+
* "Cuneiform {commandTitle} for {username} ({orgName})"
|
|
120
|
+
*
|
|
121
|
+
* @param options - The contextual header configuration
|
|
122
|
+
* @returns A formatted header string
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* renderContextualHeader({ commandTitle: 'User Details', username: 'admin@example.com', orgName: 'Acme Corp' })
|
|
126
|
+
*/
|
|
127
|
+
export declare function renderContextualHeader(options: ContextualHeaderOptions): string;
|
|
128
|
+
/**
|
|
129
|
+
* Org context information for display at the top of command output.
|
|
130
|
+
*/
|
|
131
|
+
export type OrgContext = {
|
|
132
|
+
/** Organization name from the Organization sObject */
|
|
133
|
+
readonly orgName?: string;
|
|
134
|
+
/** 18-character Organization ID */
|
|
135
|
+
readonly orgId: string;
|
|
136
|
+
/** Instance URL (e.g., https://acme.my.salesforce.com) */
|
|
137
|
+
readonly instanceUrl: string;
|
|
138
|
+
/** Whether this is a sandbox org */
|
|
139
|
+
readonly isSandbox: boolean;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Renders an Org Context section as a summary box.
|
|
143
|
+
*
|
|
144
|
+
* Displays the connected org's name, ID, instance URL, and type
|
|
145
|
+
* (Production or Sandbox). This section should appear first in
|
|
146
|
+
* command output to establish which org the user is operating in.
|
|
147
|
+
*
|
|
148
|
+
* @param context - The org context data to render
|
|
149
|
+
* @returns A multi-line formatted string
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* renderOrgContext({ orgName: 'Acme Corp', orgId: '00Dxx0000001gErEAI', instanceUrl: 'https://acme.my.salesforce.com' })
|
|
153
|
+
*/
|
|
154
|
+
export declare function renderOrgContext(context: OrgContext): string;
|
|
@@ -0,0 +1,154 @@
|
|
|
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
|
+
/**
|
|
9
|
+
* Higher-level display composition utilities for CLI command output.
|
|
10
|
+
*
|
|
11
|
+
* Composes Phase 0 primitives (sections, indicators) into reusable
|
|
12
|
+
* rendering functions for summary boxes, completion messages, and
|
|
13
|
+
* warning blocks used across multiple commands.
|
|
14
|
+
*
|
|
15
|
+
* All functions are pure (no side effects, no external state) and return
|
|
16
|
+
* formatted strings.
|
|
17
|
+
*
|
|
18
|
+
* @module utils/formatting/command-display
|
|
19
|
+
*/
|
|
20
|
+
import { sectionHeader, keyValue, bulletList } from './sections.js';
|
|
21
|
+
import { statusSymbol } from './indicators.js';
|
|
22
|
+
/**
|
|
23
|
+
* Renders a summary box with a header, key-value entries, and a separator.
|
|
24
|
+
*
|
|
25
|
+
* Produces a structured block of output suitable for displaying command
|
|
26
|
+
* results, org details, or object metadata. Empty entries produce
|
|
27
|
+
* a header and separator with no key-value lines between them.
|
|
28
|
+
*
|
|
29
|
+
* @param options - The summary box configuration
|
|
30
|
+
* @returns A multi-line formatted string
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* renderSummaryBox({ title: 'Org Details', entries: [{ key: 'Username', value: 'admin@example.com' }] })
|
|
34
|
+
*/
|
|
35
|
+
export function renderSummaryBox(options) {
|
|
36
|
+
const maxKeyLength = options.entries.reduce((max, e) => Math.max(max, e.key.length), 0);
|
|
37
|
+
const autoKeyWidth = Math.max(20, maxKeyLength + 2);
|
|
38
|
+
const effectiveKeyWidth = options.keyWidth ?? autoKeyWidth;
|
|
39
|
+
const kvOptions = { keyWidth: effectiveKeyWidth };
|
|
40
|
+
const lines = [sectionHeader(options.title)];
|
|
41
|
+
for (const entry of options.entries) {
|
|
42
|
+
lines.push(keyValue(entry.key, entry.value, kvOptions));
|
|
43
|
+
}
|
|
44
|
+
return lines.join('\n');
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Logs a summary box to the console, line by line.
|
|
48
|
+
*
|
|
49
|
+
* Wraps {@link renderSummaryBox} with the common pattern of splitting
|
|
50
|
+
* the multi-line output and logging each line individually. Prepends
|
|
51
|
+
* a blank line for visual separation from preceding output.
|
|
52
|
+
*
|
|
53
|
+
* @param log - The logging function (typically `this.log.bind(this)`)
|
|
54
|
+
* @param options - The summary box configuration
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* displaySummaryBox(this.log.bind(this), {
|
|
59
|
+
* title: 'Summary',
|
|
60
|
+
* entries: [
|
|
61
|
+
* { key: 'Deleted', value: '5' },
|
|
62
|
+
* { key: 'Failed', value: '0' },
|
|
63
|
+
* ],
|
|
64
|
+
* });
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
export function displaySummaryBox(log, options) {
|
|
68
|
+
log('');
|
|
69
|
+
for (const line of renderSummaryBox(options).split('\n')) {
|
|
70
|
+
log(line);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Renders a completion message with a status symbol and optional detail lines.
|
|
75
|
+
*
|
|
76
|
+
* Used at the end of command execution to indicate success, failure, or
|
|
77
|
+
* warning outcomes with structured details.
|
|
78
|
+
*
|
|
79
|
+
* @param options - The completion message configuration
|
|
80
|
+
* @returns A formatted string with status symbol, message, and optional details
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* renderCompletionMessage({ status: 'success', message: 'Exported 42 definitions' })
|
|
84
|
+
*/
|
|
85
|
+
export function renderCompletionMessage(options) {
|
|
86
|
+
const lines = [`${statusSymbol(options.status)} ${options.message}`];
|
|
87
|
+
if (options.details !== undefined && options.details.length > 0) {
|
|
88
|
+
lines.push(...bulletList([...options.details]));
|
|
89
|
+
}
|
|
90
|
+
return lines.join('\n');
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Renders a warning block with a header and bullet list of items.
|
|
94
|
+
*
|
|
95
|
+
* Used to display non-fatal warnings that the user should be aware of
|
|
96
|
+
* but that don't prevent command completion.
|
|
97
|
+
*
|
|
98
|
+
* @param options - The warning block configuration
|
|
99
|
+
* @returns A formatted warning string, or an empty string if no items
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* renderWarningBlock({ title: 'Warnings', items: ['3 objects have no record types'] })
|
|
103
|
+
*/
|
|
104
|
+
export function renderWarningBlock(options) {
|
|
105
|
+
if (options.items.length === 0) {
|
|
106
|
+
return '';
|
|
107
|
+
}
|
|
108
|
+
const lines = [`${statusSymbol('warning')} ${options.title}`, ...bulletList([...options.items])];
|
|
109
|
+
return lines.join('\n');
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Renders a contextual header line for CLI command output.
|
|
113
|
+
*
|
|
114
|
+
* Produces a single line that frames the command output with context:
|
|
115
|
+
* "Cuneiform {commandTitle} for {username} ({orgName})"
|
|
116
|
+
*
|
|
117
|
+
* @param options - The contextual header configuration
|
|
118
|
+
* @returns A formatted header string
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* renderContextualHeader({ commandTitle: 'User Details', username: 'admin@example.com', orgName: 'Acme Corp' })
|
|
122
|
+
*/
|
|
123
|
+
export function renderContextualHeader(options) {
|
|
124
|
+
const base = `Cuneiform ${options.commandTitle} for ${options.username}`;
|
|
125
|
+
if (options.orgName) {
|
|
126
|
+
return `${base} (${options.orgName})`;
|
|
127
|
+
}
|
|
128
|
+
return base;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Renders an Org Context section as a summary box.
|
|
132
|
+
*
|
|
133
|
+
* Displays the connected org's name, ID, instance URL, and type
|
|
134
|
+
* (Production or Sandbox). This section should appear first in
|
|
135
|
+
* command output to establish which org the user is operating in.
|
|
136
|
+
*
|
|
137
|
+
* @param context - The org context data to render
|
|
138
|
+
* @returns A multi-line formatted string
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* renderOrgContext({ orgName: 'Acme Corp', orgId: '00Dxx0000001gErEAI', instanceUrl: 'https://acme.my.salesforce.com' })
|
|
142
|
+
*/
|
|
143
|
+
export function renderOrgContext(context) {
|
|
144
|
+
return renderSummaryBox({
|
|
145
|
+
title: 'Org Context',
|
|
146
|
+
entries: [
|
|
147
|
+
{ key: 'Org Name', value: context.orgName ?? '(unknown)' },
|
|
148
|
+
{ key: 'Org ID', value: context.orgId },
|
|
149
|
+
{ key: 'Instance URL', value: context.instanceUrl },
|
|
150
|
+
{ key: 'Org Type', value: context.isSandbox ? 'Sandbox' : 'Production' },
|
|
151
|
+
],
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
//# sourceMappingURL=command-display.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-display.js","sourceRoot":"","sources":["../../../src/utils/formatting/command-display.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { Messages } from '@salesforce/core';
|
|
2
|
+
import type { CreateResult } from '../../operations/DefinitionCreateOperation.js';
|
|
3
|
+
import type { SummaryEntry } from './command-display.js';
|
|
4
|
+
/**
|
|
5
|
+
* Callback result shape from the operation's onObjectComplete callback.
|
|
6
|
+
* Captures per-object status for post-execution rendering.
|
|
7
|
+
*/
|
|
8
|
+
export type CallbackResult = {
|
|
9
|
+
objectName: string;
|
|
10
|
+
objectLabel?: string;
|
|
11
|
+
status: 'success' | 'skip' | 'fail' | 'preview';
|
|
12
|
+
type?: 'metadata' | 'historical' | 'comparative';
|
|
13
|
+
definitionKey?: string;
|
|
14
|
+
category?: string;
|
|
15
|
+
timeCategory?: string;
|
|
16
|
+
segmentCategory?: string;
|
|
17
|
+
fieldCount?: number;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Returns column definitions for the definition results table.
|
|
21
|
+
*/
|
|
22
|
+
export declare function getTableColumns(): Array<{
|
|
23
|
+
key: string;
|
|
24
|
+
name: string;
|
|
25
|
+
}>;
|
|
26
|
+
/**
|
|
27
|
+
* Builds table data rows from callback results for table rendering.
|
|
28
|
+
*
|
|
29
|
+
* @param results - The callback results to render
|
|
30
|
+
* @param recordCounts - Optional record counts by object name
|
|
31
|
+
* @returns Array of row data records
|
|
32
|
+
*/
|
|
33
|
+
export declare function buildTableData(results: Array<{
|
|
34
|
+
objectName: string;
|
|
35
|
+
objectLabel?: string;
|
|
36
|
+
type?: string;
|
|
37
|
+
category?: string;
|
|
38
|
+
timeCategory?: string;
|
|
39
|
+
segmentCategory?: string;
|
|
40
|
+
}>, recordCounts?: Map<string, number>): Array<Record<string, string>>;
|
|
41
|
+
/**
|
|
42
|
+
* Displays the Org Context section using the shared renderOrgContext utility.
|
|
43
|
+
*
|
|
44
|
+
* @param log - The logging function
|
|
45
|
+
* @param orgIdentity - The org identity data
|
|
46
|
+
* @param instanceUrl - The org instance URL
|
|
47
|
+
*/
|
|
48
|
+
export declare function displayOrgContext(log: (msg: string) => void, orgIdentity: {
|
|
49
|
+
organizationName?: string;
|
|
50
|
+
organizationId: string;
|
|
51
|
+
organizationType?: string;
|
|
52
|
+
isSandbox?: boolean;
|
|
53
|
+
}, instanceUrl?: string): void;
|
|
54
|
+
/**
|
|
55
|
+
* Displays separate Created and Skipped tables, plus summary footer.
|
|
56
|
+
*
|
|
57
|
+
* @param log - The logging function
|
|
58
|
+
* @param warn - The warning function
|
|
59
|
+
* @param callbackResults - The per-object callback results
|
|
60
|
+
* @param data - The operation result data
|
|
61
|
+
* @param dryRun - Whether this is a dry run
|
|
62
|
+
* @param recordCounts - Optional record counts by object name
|
|
63
|
+
*/
|
|
64
|
+
export declare function displayResultsTables(log: (msg: string) => void, warn: (msg: string) => void, callbackResults: CallbackResult[], data: CreateResult, dryRun: boolean, recordCounts?: Map<string, number>): void;
|
|
65
|
+
/**
|
|
66
|
+
* Error code to i18n message key mapping for operation errors.
|
|
67
|
+
*/
|
|
68
|
+
export declare const ERROR_CODE_MAP: Record<string, string>;
|
|
69
|
+
/**
|
|
70
|
+
* Handles operation failure by translating error codes to user-friendly messages.
|
|
71
|
+
*
|
|
72
|
+
* Returns a structured object indicating the action to take:
|
|
73
|
+
* - `type: 'exit'` — set process.exitCode and return a result
|
|
74
|
+
* - `type: 'error'` — throw via command's this.error()
|
|
75
|
+
*
|
|
76
|
+
* @param result - The failed operation result
|
|
77
|
+
* @param targetOrg - The target org identifier
|
|
78
|
+
* @param dryRun - Whether this is a dry run
|
|
79
|
+
* @param resolveErrorMessage - The error message resolution function from CuneiformCommand
|
|
80
|
+
* @returns An action descriptor for the command to execute
|
|
81
|
+
*/
|
|
82
|
+
export declare function resolveOperationFailure(result: {
|
|
83
|
+
success: boolean;
|
|
84
|
+
errorCode?: string;
|
|
85
|
+
message?: string;
|
|
86
|
+
}, targetOrg: string, dryRun: boolean, resolveErrorMessage: (errorCodeMap: Record<string, string>, errorCode: string | undefined, fallbackMessage: string, msgs: Messages<string>) => string): {
|
|
87
|
+
type: 'exit' | 'error';
|
|
88
|
+
result?: {
|
|
89
|
+
success: boolean;
|
|
90
|
+
created: number;
|
|
91
|
+
failed: number;
|
|
92
|
+
skipped: number;
|
|
93
|
+
total: number;
|
|
94
|
+
dryRun: boolean;
|
|
95
|
+
failures: Array<{
|
|
96
|
+
objectName: string;
|
|
97
|
+
error: string;
|
|
98
|
+
errorCode: string;
|
|
99
|
+
}>;
|
|
100
|
+
results: Array<{
|
|
101
|
+
objectName: string;
|
|
102
|
+
status: string;
|
|
103
|
+
}>;
|
|
104
|
+
};
|
|
105
|
+
message?: string;
|
|
106
|
+
code?: string;
|
|
107
|
+
log?: string;
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Builds the pre-confirmation summary box entries for the preview stage.
|
|
111
|
+
*
|
|
112
|
+
* @param uniqueObjects - Number of unique objects
|
|
113
|
+
* @param method - The profiling method
|
|
114
|
+
* @param toCreateCount - Number of definitions to create
|
|
115
|
+
* @param toSkipCount - Number of definitions to skip
|
|
116
|
+
* @returns Array of summary entries for renderSummaryBox
|
|
117
|
+
*/
|
|
118
|
+
export declare function buildPreConfirmSummary(uniqueObjects: number, method: string, toCreateCount: number, toSkipCount: number): SummaryEntry[];
|