@peernova/cuneiform-sf 1.0.2 → 1.0.4-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +81 -30
- package/README.md +168 -134
- package/lib/adapters/connection-facade.d.ts +458 -0
- package/lib/adapters/connection-facade.js +379 -0
- package/lib/adapters/connection-facade.js.map +1 -0
- package/lib/adapters/errors.d.ts +547 -0
- package/lib/adapters/errors.js +937 -0
- package/lib/adapters/errors.js.map +1 -0
- package/lib/adapters/lifecycle.d.ts +112 -0
- package/lib/adapters/lifecycle.js +94 -0
- package/lib/adapters/lifecycle.js.map +1 -0
- package/lib/adapters/rest/cache.d.ts +69 -0
- package/lib/adapters/rest/cache.js +133 -0
- package/lib/adapters/rest/cache.js.map +1 -0
- package/lib/adapters/rest/index.d.ts +11 -0
- package/lib/adapters/rest/index.js +18 -0
- package/lib/adapters/rest/index.js.map +1 -0
- package/lib/adapters/rest/profiling-rest-client.d.ts +137 -0
- package/lib/adapters/rest/profiling-rest-client.js +115 -0
- package/lib/adapters/rest/profiling-rest-client.js.map +1 -0
- package/lib/adapters/rest/rest-api-adapter.d.ts +393 -0
- package/lib/adapters/rest/rest-api-adapter.js +764 -0
- package/lib/adapters/rest/rest-api-adapter.js.map +1 -0
- package/lib/adapters/rest/types.d.ts +34 -0
- package/lib/adapters/rest/types.js +9 -0
- package/lib/adapters/rest/types.js.map +1 -0
- package/lib/adapters/retry.d.ts +91 -0
- package/lib/adapters/retry.js +215 -0
- package/lib/adapters/retry.js.map +1 -0
- package/lib/adapters/soql/cuneiform-query-builder.d.ts +418 -0
- package/lib/adapters/soql/cuneiform-query-builder.js +606 -0
- package/lib/adapters/soql/cuneiform-query-builder.js.map +1 -0
- package/lib/adapters/soql/soql-query-adapter.d.ts +141 -0
- package/lib/adapters/soql/soql-query-adapter.js +259 -0
- package/lib/adapters/soql/soql-query-adapter.js.map +1 -0
- package/lib/adapters/soql/types.d.ts +37 -0
- package/lib/adapters/soql/types.js +19 -0
- package/lib/adapters/soql/types.js.map +1 -0
- package/lib/adapters/testing/index.d.ts +37 -0
- package/lib/adapters/testing/index.js +20 -0
- package/lib/adapters/testing/index.js.map +1 -0
- package/lib/adapters/testing/mock-connection.d.ts +77 -0
- package/lib/adapters/testing/mock-connection.js +207 -0
- package/lib/adapters/testing/mock-connection.js.map +1 -0
- package/lib/adapters/testing/mock-logger.d.ts +29 -0
- package/lib/adapters/testing/mock-logger.js +57 -0
- package/lib/adapters/testing/mock-logger.js.map +1 -0
- package/lib/adapters/testing/mock-mcp-adapters.d.ts +32 -0
- package/lib/adapters/testing/mock-mcp-adapters.js +52 -0
- package/lib/adapters/testing/mock-mcp-adapters.js.map +1 -0
- package/lib/adapters/testing/mock-oclif-config.d.ts +22 -0
- package/lib/adapters/testing/mock-oclif-config.js +90 -0
- package/lib/adapters/testing/mock-oclif-config.js.map +1 -0
- package/lib/adapters/testing/mock-rest-adapter.d.ts +26 -0
- package/lib/adapters/testing/mock-rest-adapter.js +243 -0
- package/lib/adapters/testing/mock-rest-adapter.js.map +1 -0
- package/lib/adapters/testing/mock-salesforce-connection.d.ts +40 -0
- package/lib/adapters/testing/mock-salesforce-connection.js +61 -0
- package/lib/adapters/testing/mock-salesforce-connection.js.map +1 -0
- package/lib/adapters/testing/mock-soql-adapter.d.ts +30 -0
- package/lib/adapters/testing/mock-soql-adapter.js +120 -0
- package/lib/adapters/testing/mock-soql-adapter.js.map +1 -0
- package/lib/adapters/testing/mock-tooling-adapter.d.ts +24 -0
- package/lib/adapters/testing/mock-tooling-adapter.js +163 -0
- package/lib/adapters/testing/mock-tooling-adapter.js.map +1 -0
- package/lib/adapters/testing/stub-connection.d.ts +93 -0
- package/lib/adapters/testing/stub-connection.js +97 -0
- package/lib/adapters/testing/stub-connection.js.map +1 -0
- package/lib/adapters/testing/stub-rest-adapter.d.ts +52 -0
- package/lib/adapters/testing/stub-rest-adapter.js +58 -0
- package/lib/adapters/testing/stub-rest-adapter.js.map +1 -0
- package/lib/adapters/testing/stub-soql-adapter.d.ts +56 -0
- package/lib/adapters/testing/stub-soql-adapter.js +50 -0
- package/lib/adapters/testing/stub-soql-adapter.js.map +1 -0
- package/lib/adapters/testing/types.d.ts +71 -0
- package/lib/adapters/testing/types.js +9 -0
- package/lib/adapters/testing/types.js.map +1 -0
- package/lib/adapters/tooling/index.d.ts +10 -0
- package/lib/adapters/tooling/index.js +17 -0
- package/lib/adapters/tooling/index.js.map +1 -0
- package/lib/adapters/tooling/tooling-api-adapter.d.ts +157 -0
- package/lib/adapters/tooling/tooling-api-adapter.js +339 -0
- package/lib/adapters/tooling/tooling-api-adapter.js.map +1 -0
- package/lib/adapters/tooling/types.d.ts +81 -0
- package/lib/adapters/tooling/types.js +9 -0
- package/lib/adapters/tooling/types.js.map +1 -0
- package/lib/adapters/types.d.ts +112 -0
- package/lib/adapters/types.js +169 -0
- package/lib/adapters/types.js.map +1 -0
- package/lib/base/cuneiform-command.d.ts +175 -0
- package/lib/base/cuneiform-command.js +326 -0
- package/lib/base/cuneiform-command.js.map +1 -0
- package/lib/commands/cuneiform/compatibility/check.d.ts +43 -0
- package/lib/commands/cuneiform/compatibility/check.js +114 -0
- package/lib/commands/cuneiform/compatibility/check.js.map +1 -0
- package/lib/commands/cuneiform/definition/create.d.ts +120 -0
- package/lib/commands/cuneiform/definition/create.js +737 -0
- package/lib/commands/cuneiform/definition/create.js.map +1 -0
- package/lib/commands/cuneiform/definition/export.d.ts +57 -0
- package/lib/commands/cuneiform/definition/export.js +133 -0
- package/lib/commands/cuneiform/definition/export.js.map +1 -0
- package/lib/commands/cuneiform/definition/get.d.ts +86 -0
- package/lib/commands/cuneiform/definition/get.js +277 -0
- package/lib/commands/cuneiform/definition/get.js.map +1 -0
- package/lib/commands/cuneiform/definition/import.d.ts +54 -0
- package/lib/commands/cuneiform/definition/import.js +118 -0
- package/lib/commands/cuneiform/definition/import.js.map +1 -0
- package/lib/commands/cuneiform/definition/list.d.ts +110 -0
- package/lib/commands/cuneiform/definition/list.js +351 -0
- package/lib/commands/cuneiform/definition/list.js.map +1 -0
- package/lib/commands/cuneiform/definition/purge.d.ts +109 -0
- package/lib/commands/cuneiform/definition/purge.js +578 -0
- package/lib/commands/cuneiform/definition/purge.js.map +1 -0
- package/lib/commands/cuneiform/definition/update.d.ts +58 -0
- package/lib/commands/cuneiform/definition/update.js +209 -0
- package/lib/commands/cuneiform/definition/update.js.map +1 -0
- package/lib/commands/cuneiform/mcp/serve.d.ts +56 -0
- package/lib/commands/cuneiform/mcp/serve.js +109 -0
- package/lib/commands/cuneiform/mcp/serve.js.map +1 -0
- package/lib/commands/cuneiform/object/describe.d.ts +61 -0
- package/lib/commands/cuneiform/object/describe.js +461 -0
- package/lib/commands/cuneiform/object/describe.js.map +1 -0
- package/lib/commands/cuneiform/object/list.d.ts +123 -0
- package/lib/commands/cuneiform/object/list.js +264 -0
- package/lib/commands/cuneiform/object/list.js.map +1 -0
- package/lib/commands/cuneiform/org/details.d.ts +99 -0
- package/lib/commands/cuneiform/org/details.js +521 -0
- package/lib/commands/cuneiform/org/details.js.map +1 -0
- package/lib/commands/cuneiform/org/reset.d.ts +46 -0
- package/lib/commands/cuneiform/org/reset.js +135 -0
- package/lib/commands/cuneiform/org/reset.js.map +1 -0
- package/lib/commands/cuneiform/profile/request/cancel.d.ts +59 -0
- package/lib/commands/cuneiform/profile/request/cancel.js +202 -0
- package/lib/commands/cuneiform/profile/request/cancel.js.map +1 -0
- package/lib/commands/cuneiform/profile/request/delete.d.ts +59 -0
- package/lib/commands/cuneiform/profile/request/delete.js +223 -0
- package/lib/commands/cuneiform/profile/request/delete.js.map +1 -0
- package/lib/commands/cuneiform/profile/request/list.d.ts +35 -0
- package/lib/commands/cuneiform/profile/request/list.js +102 -0
- package/lib/commands/cuneiform/profile/request/list.js.map +1 -0
- package/lib/commands/cuneiform/profile.d.ts +93 -0
- package/lib/commands/cuneiform/profile.js +353 -0
- package/lib/commands/cuneiform/profile.js.map +1 -0
- package/lib/commands/cuneiform/summary/purge.d.ts +80 -0
- package/lib/commands/cuneiform/summary/purge.js +467 -0
- package/lib/commands/cuneiform/summary/purge.js.map +1 -0
- package/lib/commands/cuneiform/summary/reprofile.d.ts +60 -0
- package/lib/commands/cuneiform/summary/reprofile.js +236 -0
- package/lib/commands/cuneiform/summary/reprofile.js.map +1 -0
- package/lib/commands/cuneiform/summary/stop.d.ts +59 -0
- package/lib/commands/cuneiform/summary/stop.js +234 -0
- package/lib/commands/cuneiform/summary/stop.js.map +1 -0
- package/lib/commands/cuneiform/user/details.d.ts +77 -0
- package/lib/commands/cuneiform/user/details.js +414 -0
- package/lib/commands/cuneiform/user/details.js.map +1 -0
- package/lib/constants/namespace-constants.d.ts +102 -0
- package/lib/constants/namespace-constants.js +225 -0
- package/lib/constants/namespace-constants.js.map +1 -0
- package/lib/debug/command-debug-proxy.d.ts +101 -0
- package/lib/debug/command-debug-proxy.js +171 -0
- package/lib/debug/command-debug-proxy.js.map +1 -0
- package/lib/debug/debug-logger.d.ts +85 -0
- package/lib/debug/debug-logger.js +133 -0
- package/lib/debug/debug-logger.js.map +1 -0
- package/lib/debug/service-debug-proxy.d.ts +30 -0
- package/lib/debug/service-debug-proxy.js +102 -0
- package/lib/debug/service-debug-proxy.js.map +1 -0
- package/lib/hooks/prerun.d.ts +25 -0
- package/lib/hooks/prerun.js +47 -0
- package/lib/hooks/prerun.js.map +1 -0
- package/lib/mcp/config/mcp-config.d.ts +55 -0
- package/lib/mcp/config/mcp-config.js +51 -0
- package/lib/mcp/config/mcp-config.js.map +1 -0
- package/lib/mcp/config/pagination.d.ts +96 -0
- package/lib/mcp/config/pagination.js +108 -0
- package/lib/mcp/config/pagination.js.map +1 -0
- package/lib/mcp/config/system-prompts.d.ts +18 -0
- package/lib/mcp/config/system-prompts.js +92 -0
- package/lib/mcp/config/system-prompts.js.map +1 -0
- package/lib/mcp/errors.d.ts +23 -0
- package/lib/mcp/errors.js +27 -0
- package/lib/mcp/errors.js.map +1 -0
- package/lib/mcp/schemas/input-schemas.d.ts +327 -0
- package/lib/mcp/schemas/input-schemas.js +310 -0
- package/lib/mcp/schemas/input-schemas.js.map +1 -0
- package/lib/mcp/server.d.ts +40 -0
- package/lib/mcp/server.js +316 -0
- package/lib/mcp/server.js.map +1 -0
- package/lib/mcp/tools/contactpoint-tools.d.ts +14 -0
- package/lib/mcp/tools/contactpoint-tools.js +34 -0
- package/lib/mcp/tools/contactpoint-tools.js.map +1 -0
- package/lib/mcp/tools/definition-io-tools.d.ts +19 -0
- package/lib/mcp/tools/definition-io-tools.js +152 -0
- package/lib/mcp/tools/definition-io-tools.js.map +1 -0
- package/lib/mcp/tools/definition-tools.d.ts +51 -0
- package/lib/mcp/tools/definition-tools.js +220 -0
- package/lib/mcp/tools/definition-tools.js.map +1 -0
- package/lib/mcp/tools/index.d.ts +37 -0
- package/lib/mcp/tools/index.js +88 -0
- package/lib/mcp/tools/index.js.map +1 -0
- package/lib/mcp/tools/object-tools.d.ts +22 -0
- package/lib/mcp/tools/object-tools.js +327 -0
- package/lib/mcp/tools/object-tools.js.map +1 -0
- package/lib/mcp/tools/org-tools.d.ts +14 -0
- package/lib/mcp/tools/org-tools.js +177 -0
- package/lib/mcp/tools/org-tools.js.map +1 -0
- package/lib/mcp/tools/profile-tools.d.ts +59 -0
- package/lib/mcp/tools/profile-tools.js +213 -0
- package/lib/mcp/tools/profile-tools.js.map +1 -0
- package/lib/mcp/tools/summary-tools.d.ts +14 -0
- package/lib/mcp/tools/summary-tools.js +38 -0
- package/lib/mcp/tools/summary-tools.js.map +1 -0
- package/lib/mcp/tools/tool-factory.d.ts +63 -0
- package/lib/mcp/tools/tool-factory.js +146 -0
- package/lib/mcp/tools/tool-factory.js.map +1 -0
- package/lib/mcp/tools/user-tools.d.ts +25 -0
- package/lib/mcp/tools/user-tools.js +167 -0
- package/lib/mcp/tools/user-tools.js.map +1 -0
- package/lib/models/cascade-skip-accumulator.d.ts +25 -0
- package/lib/models/cascade-skip-accumulator.js +9 -0
- package/lib/models/cascade-skip-accumulator.js.map +1 -0
- package/lib/models/date-literal.d.ts +280 -0
- package/lib/models/date-literal.js +1164 -0
- package/lib/models/date-literal.js.map +1 -0
- package/lib/models/object-describe-types.d.ts +173 -0
- package/lib/models/object-describe-types.js +9 -0
- package/lib/models/object-describe-types.js.map +1 -0
- package/lib/models/portability-recipe.d.ts +35 -0
- package/lib/models/portability-recipe.js +113 -0
- package/lib/models/portability-recipe.js.map +1 -0
- package/lib/models/profile-request-types.d.ts +118 -0
- package/lib/models/profile-request-types.js +23 -0
- package/lib/models/profile-request-types.js.map +1 -0
- package/lib/models/profiling-execution-types.d.ts +154 -0
- package/lib/models/profiling-execution-types.js +14 -0
- package/lib/models/profiling-execution-types.js.map +1 -0
- package/lib/models/service-result.d.ts +114 -0
- package/lib/models/service-result.js +81 -0
- package/lib/models/service-result.js.map +1 -0
- package/lib/models/sfdmu-types.d.ts +49 -0
- package/lib/models/sfdmu-types.js +23 -0
- package/lib/models/sfdmu-types.js.map +1 -0
- package/lib/models/status-types.d.ts +38 -0
- package/lib/models/status-types.js +12 -0
- package/lib/models/status-types.js.map +1 -0
- package/lib/models/summary-bulk-types.d.ts +61 -0
- package/lib/models/summary-bulk-types.js +23 -0
- package/lib/models/summary-bulk-types.js.map +1 -0
- package/lib/models/user-details-types.d.ts +188 -0
- package/lib/models/user-details-types.js +9 -0
- package/lib/models/user-details-types.js.map +1 -0
- package/lib/models/year-range.d.ts +78 -0
- package/lib/models/year-range.js +153 -0
- package/lib/models/year-range.js.map +1 -0
- package/lib/operations/CompatibilityCheckOperation.d.ts +62 -0
- package/lib/operations/CompatibilityCheckOperation.js +102 -0
- package/lib/operations/CompatibilityCheckOperation.js.map +1 -0
- package/lib/operations/DefinitionCreateOperation.d.ts +427 -0
- package/lib/operations/DefinitionCreateOperation.js +1270 -0
- package/lib/operations/DefinitionCreateOperation.js.map +1 -0
- package/lib/operations/DefinitionExportOperation.d.ts +155 -0
- package/lib/operations/DefinitionExportOperation.js +281 -0
- package/lib/operations/DefinitionExportOperation.js.map +1 -0
- package/lib/operations/DefinitionImportOperation.d.ts +144 -0
- package/lib/operations/DefinitionImportOperation.js +357 -0
- package/lib/operations/DefinitionImportOperation.js.map +1 -0
- package/lib/operations/DefinitionListOperation.d.ts +66 -0
- package/lib/operations/DefinitionListOperation.js +108 -0
- package/lib/operations/DefinitionListOperation.js.map +1 -0
- package/lib/operations/DefinitionPurgeOperation.d.ts +203 -0
- package/lib/operations/DefinitionPurgeOperation.js +465 -0
- package/lib/operations/DefinitionPurgeOperation.js.map +1 -0
- package/lib/operations/DefinitionUpdateOperation.d.ts +78 -0
- package/lib/operations/DefinitionUpdateOperation.js +142 -0
- package/lib/operations/DefinitionUpdateOperation.js.map +1 -0
- package/lib/operations/OrgDetailsOperation.d.ts +253 -0
- package/lib/operations/OrgDetailsOperation.js +456 -0
- package/lib/operations/OrgDetailsOperation.js.map +1 -0
- package/lib/operations/OrgResetOperation.d.ts +114 -0
- package/lib/operations/OrgResetOperation.js +209 -0
- package/lib/operations/OrgResetOperation.js.map +1 -0
- package/lib/operations/ProfileOperation.d.ts +192 -0
- package/lib/operations/ProfileOperation.js +371 -0
- package/lib/operations/ProfileOperation.js.map +1 -0
- package/lib/operations/ProfileRequestCancelOperation.d.ts +59 -0
- package/lib/operations/ProfileRequestCancelOperation.js +137 -0
- package/lib/operations/ProfileRequestCancelOperation.js.map +1 -0
- package/lib/operations/ProfileRequestDeleteOperation.d.ts +64 -0
- package/lib/operations/ProfileRequestDeleteOperation.js +134 -0
- package/lib/operations/ProfileRequestDeleteOperation.js.map +1 -0
- package/lib/operations/ProfileRequestListOperation.d.ts +39 -0
- package/lib/operations/ProfileRequestListOperation.js +61 -0
- package/lib/operations/ProfileRequestListOperation.js.map +1 -0
- package/lib/operations/SummaryPurgeOperation.d.ts +134 -0
- package/lib/operations/SummaryPurgeOperation.js +257 -0
- package/lib/operations/SummaryPurgeOperation.js.map +1 -0
- package/lib/operations/SummaryReprofileOperation.d.ts +88 -0
- package/lib/operations/SummaryReprofileOperation.js +174 -0
- package/lib/operations/SummaryReprofileOperation.js.map +1 -0
- package/lib/operations/SummaryStopOperation.d.ts +87 -0
- package/lib/operations/SummaryStopOperation.js +175 -0
- package/lib/operations/SummaryStopOperation.js.map +1 -0
- package/lib/services/BulkExecutionService.d.ts +120 -0
- package/lib/services/BulkExecutionService.js +535 -0
- package/lib/services/BulkExecutionService.js.map +1 -0
- package/lib/services/CompatibilityService.d.ts +81 -0
- package/lib/services/CompatibilityService.js +118 -0
- package/lib/services/CompatibilityService.js.map +1 -0
- package/lib/services/ConfigureMode.d.ts +98 -0
- package/lib/services/ConfigureMode.js +413 -0
- package/lib/services/ConfigureMode.js.map +1 -0
- package/lib/services/ContactPointService.d.ts +111 -0
- package/lib/services/ContactPointService.js +286 -0
- package/lib/services/ContactPointService.js.map +1 -0
- package/lib/services/DataAvailabilityService.d.ts +81 -0
- package/lib/services/DataAvailabilityService.js +128 -0
- package/lib/services/DataAvailabilityService.js.map +1 -0
- package/lib/services/DefinitionFieldGenerationService.d.ts +357 -0
- package/lib/services/DefinitionFieldGenerationService.js +899 -0
- package/lib/services/DefinitionFieldGenerationService.js.map +1 -0
- package/lib/services/DefinitionQueryBuilder.d.ts +92 -0
- package/lib/services/DefinitionQueryBuilder.js +328 -0
- package/lib/services/DefinitionQueryBuilder.js.map +1 -0
- package/lib/services/ObjectDescribeService.d.ts +436 -0
- package/lib/services/ObjectDescribeService.js +881 -0
- package/lib/services/ObjectDescribeService.js.map +1 -0
- package/lib/services/ObjectFilteringService.d.ts +484 -0
- package/lib/services/ObjectFilteringService.js +1080 -0
- package/lib/services/ObjectFilteringService.js.map +1 -0
- package/lib/services/ObjectListCommandService.d.ts +467 -0
- package/lib/services/ObjectListCommandService.js +904 -0
- package/lib/services/ObjectListCommandService.js.map +1 -0
- package/lib/services/ObjectListService.d.ts +201 -0
- package/lib/services/ObjectListService.js +350 -0
- package/lib/services/ObjectListService.js.map +1 -0
- package/lib/services/OrgInfoService.d.ts +493 -0
- package/lib/services/OrgInfoService.js +1142 -0
- package/lib/services/OrgInfoService.js.map +1 -0
- package/lib/services/PollingService.d.ts +105 -0
- package/lib/services/PollingService.js +117 -0
- package/lib/services/PollingService.js.map +1 -0
- package/lib/services/ProfileRequestService.d.ts +186 -0
- package/lib/services/ProfileRequestService.js +555 -0
- package/lib/services/ProfileRequestService.js.map +1 -0
- package/lib/services/ProfilingDefinitionService.d.ts +575 -0
- package/lib/services/ProfilingDefinitionService.js +1029 -0
- package/lib/services/ProfilingDefinitionService.js.map +1 -0
- package/lib/services/ProfilingExecutionService.d.ts +122 -0
- package/lib/services/ProfilingExecutionService.js +320 -0
- package/lib/services/ProfilingExecutionService.js.map +1 -0
- package/lib/services/ProfilingSummaryService.d.ts +292 -0
- package/lib/services/ProfilingSummaryService.js +688 -0
- package/lib/services/ProfilingSummaryService.js.map +1 -0
- package/lib/services/RecordTypeService.d.ts +129 -0
- package/lib/services/RecordTypeService.js +284 -0
- package/lib/services/RecordTypeService.js.map +1 -0
- package/lib/services/SFDMUService.d.ts +146 -0
- package/lib/services/SFDMUService.js +323 -0
- package/lib/services/SFDMUService.js.map +1 -0
- package/lib/services/TabDetectionService.d.ts +105 -0
- package/lib/services/TabDetectionService.js +206 -0
- package/lib/services/TabDetectionService.js.map +1 -0
- package/lib/services/UnconfigureMode.d.ts +74 -0
- package/lib/services/UnconfigureMode.js +378 -0
- package/lib/services/UnconfigureMode.js.map +1 -0
- package/lib/services/UserConfigurationService.d.ts +158 -0
- package/lib/services/UserConfigurationService.js +574 -0
- package/lib/services/UserConfigurationService.js.map +1 -0
- package/lib/services/UserConfigurationTypes.d.ts +181 -0
- package/lib/services/UserConfigurationTypes.js +14 -0
- package/lib/services/UserConfigurationTypes.js.map +1 -0
- package/lib/services/UserReadinessService.d.ts +347 -0
- package/lib/services/UserReadinessService.js +891 -0
- package/lib/services/UserReadinessService.js.map +1 -0
- package/lib/services/constants.d.ts +54 -0
- package/lib/services/constants.js +71 -0
- package/lib/services/constants.js.map +1 -0
- package/lib/services/namespace-constants.d.ts +1 -0
- package/lib/services/namespace-constants.js +11 -0
- package/lib/services/namespace-constants.js.map +1 -0
- package/lib/services/namespace-filter.d.ts +36 -0
- package/lib/services/namespace-filter.js +109 -0
- package/lib/services/namespace-filter.js.map +1 -0
- package/lib/services/validation.d.ts +47 -0
- package/lib/services/validation.js +119 -0
- package/lib/services/validation.js.map +1 -0
- package/lib/utils/batch-processor.d.ts +13 -0
- package/lib/utils/batch-processor.js +39 -0
- package/lib/utils/batch-processor.js.map +1 -0
- package/lib/utils/formatting/availability-grid.d.ts +81 -0
- package/lib/utils/formatting/availability-grid.js +94 -0
- package/lib/utils/formatting/availability-grid.js.map +1 -0
- package/lib/utils/formatting/business-process-grid.d.ts +51 -0
- package/lib/utils/formatting/business-process-grid.js +58 -0
- package/lib/utils/formatting/business-process-grid.js.map +1 -0
- package/lib/utils/formatting/command-display.d.ts +154 -0
- package/lib/utils/formatting/command-display.js +154 -0
- package/lib/utils/formatting/command-display.js.map +1 -0
- package/lib/utils/formatting/definition-create-display.d.ts +118 -0
- package/lib/utils/formatting/definition-create-display.js +230 -0
- package/lib/utils/formatting/definition-create-display.js.map +1 -0
- package/lib/utils/formatting/empty-states.d.ts +35 -0
- package/lib/utils/formatting/empty-states.js +70 -0
- package/lib/utils/formatting/empty-states.js.map +1 -0
- package/lib/utils/formatting/errors.d.ts +33 -0
- package/lib/utils/formatting/errors.js +72 -0
- package/lib/utils/formatting/errors.js.map +1 -0
- package/lib/utils/formatting/field-types.d.ts +32 -0
- package/lib/utils/formatting/field-types.js +88 -0
- package/lib/utils/formatting/field-types.js.map +1 -0
- package/lib/utils/formatting/index.d.ts +29 -0
- package/lib/utils/formatting/index.js +28 -0
- package/lib/utils/formatting/index.js.map +1 -0
- package/lib/utils/formatting/indicators.d.ts +113 -0
- package/lib/utils/formatting/indicators.js +161 -0
- package/lib/utils/formatting/indicators.js.map +1 -0
- package/lib/utils/formatting/loading-messages.d.ts +37 -0
- package/lib/utils/formatting/loading-messages.js +50 -0
- package/lib/utils/formatting/loading-messages.js.map +1 -0
- package/lib/utils/formatting/namespace-display.d.ts +31 -0
- package/lib/utils/formatting/namespace-display.js +64 -0
- package/lib/utils/formatting/namespace-display.js.map +1 -0
- package/lib/utils/formatting/numbers.d.ts +73 -0
- package/lib/utils/formatting/numbers.js +187 -0
- package/lib/utils/formatting/numbers.js.map +1 -0
- package/lib/utils/formatting/object-describe-display.d.ts +117 -0
- package/lib/utils/formatting/object-describe-display.js +447 -0
- package/lib/utils/formatting/object-describe-display.js.map +1 -0
- package/lib/utils/formatting/object-list-display.d.ts +225 -0
- package/lib/utils/formatting/object-list-display.js +718 -0
- package/lib/utils/formatting/object-list-display.js.map +1 -0
- package/lib/utils/formatting/org-identity.d.ts +15 -0
- package/lib/utils/formatting/org-identity.js +28 -0
- package/lib/utils/formatting/org-identity.js.map +1 -0
- package/lib/utils/formatting/record-age-grid.d.ts +41 -0
- package/lib/utils/formatting/record-age-grid.js +56 -0
- package/lib/utils/formatting/record-age-grid.js.map +1 -0
- package/lib/utils/formatting/sections.d.ts +108 -0
- package/lib/utils/formatting/sections.js +150 -0
- package/lib/utils/formatting/sections.js.map +1 -0
- package/lib/utils/formatting/tables.d.ts +90 -0
- package/lib/utils/formatting/tables.js +113 -0
- package/lib/utils/formatting/tables.js.map +1 -0
- package/lib/utils/formatting/user-details-display.d.ts +101 -0
- package/lib/utils/formatting/user-details-display.js +425 -0
- package/lib/utils/formatting/user-details-display.js.map +1 -0
- package/lib/utils/pagination/keypress-reader.d.ts +20 -0
- package/lib/utils/pagination/keypress-reader.js +63 -0
- package/lib/utils/pagination/keypress-reader.js.map +1 -0
- package/lib/utils/pagination/paginate-output.d.ts +48 -0
- package/lib/utils/pagination/paginate-output.js +136 -0
- package/lib/utils/pagination/paginate-output.js.map +1 -0
- package/messages/compatibility.check.md +71 -0
- package/messages/cuneiform.access.md +138 -0
- package/messages/definition.create.md +525 -0
- package/messages/definition.export.md +84 -0
- package/messages/definition.get.md +147 -0
- package/messages/definition.import.md +65 -0
- package/messages/definition.list.md +264 -0
- package/messages/definition.purge.md +330 -0
- package/messages/definition.update.md +118 -0
- package/messages/mcp.serve.md +66 -0
- package/messages/object.describe.md +205 -0
- package/messages/object.list.md +463 -0
- package/messages/org.details.md +386 -0
- package/messages/org.reset.md +71 -0
- package/messages/profile.md +243 -0
- package/messages/profile.request.cancel.md +143 -0
- package/messages/profile.request.delete.md +139 -0
- package/messages/profile.request.list.md +89 -0
- package/messages/summary.purge.md +218 -0
- package/messages/summary.reprofile.md +150 -0
- package/messages/summary.stop.md +157 -0
- package/messages/user.details.md +501 -0
- package/oclif.lock +3267 -2148
- package/oclif.manifest.json +2829 -31
- package/package.json +104 -18
- package/lib/commands/cuneiform/about.d.ts +0 -13
- package/lib/commands/cuneiform/about.js +0 -26
- package/lib/commands/cuneiform/about.js.map +0 -1
- package/lib/commands/hello/world.d.ts +0 -14
- package/lib/commands/hello/world.js +0 -27
- package/lib/commands/hello/world.js.map +0 -1
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -2
- package/lib/index.js.map +0 -1
- package/messages/cuneiform.about.md +0 -19
- package/messages/hello.world.md +0 -29
|
@@ -0,0 +1,88 @@
|
|
|
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
|
+
* Utility for converting Salesforce field API type names to user-friendly display labels.
|
|
10
|
+
*
|
|
11
|
+
* @module utils/formatting/field-types
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Sentinel value returned when the input field type is empty, null, or undefined.
|
|
15
|
+
*/
|
|
16
|
+
export const INVALID_DISPLAY = '--';
|
|
17
|
+
/**
|
|
18
|
+
* Mapping of lowercase Salesforce API field type names to human-readable labels.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* The `reference` type is handled separately by {@link humanizeFieldType} to incorporate
|
|
22
|
+
* the optional `referenceTo` parameter.
|
|
23
|
+
*/
|
|
24
|
+
const FIELD_TYPE_LABELS = {
|
|
25
|
+
id: 'ID',
|
|
26
|
+
string: 'Text',
|
|
27
|
+
textarea: 'Text Area',
|
|
28
|
+
boolean: 'Checkbox',
|
|
29
|
+
int: 'Integer',
|
|
30
|
+
double: 'Number',
|
|
31
|
+
currency: 'Currency',
|
|
32
|
+
percent: 'Percent',
|
|
33
|
+
date: 'Date',
|
|
34
|
+
datetime: 'Date/Time',
|
|
35
|
+
time: 'Time',
|
|
36
|
+
phone: 'Phone',
|
|
37
|
+
email: 'Email',
|
|
38
|
+
url: 'URL',
|
|
39
|
+
picklist: 'Picklist',
|
|
40
|
+
multipicklist: 'Multi-Select Picklist',
|
|
41
|
+
reference: 'Lookup',
|
|
42
|
+
masterrecord: 'Master-Detail',
|
|
43
|
+
base64: 'Binary',
|
|
44
|
+
combobox: 'Combobox',
|
|
45
|
+
encryptedstring: 'Encrypted Text',
|
|
46
|
+
location: 'Geolocation',
|
|
47
|
+
address: 'Address',
|
|
48
|
+
complexvalue: 'Complex Value',
|
|
49
|
+
long: 'Long Text',
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Converts a Salesforce field API type name to a user-friendly display label.
|
|
53
|
+
*
|
|
54
|
+
* @param fieldType - The Salesforce API field type (e.g., `'string'`, `'reference'`, `'boolean'`).
|
|
55
|
+
* Matching is case-insensitive.
|
|
56
|
+
* @param referenceTo - Optional target object for reference (lookup) fields. When provided and
|
|
57
|
+
* `fieldType` is `'reference'`, the result includes the target object name
|
|
58
|
+
* (e.g., `'Lookup to Account'`).
|
|
59
|
+
* @returns A human-readable label for the field type, or {@link INVALID_DISPLAY} if the input
|
|
60
|
+
* is empty/null/undefined. Unknown types are returned in title case.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```typescript
|
|
64
|
+
* humanizeFieldType('string'); // 'Text'
|
|
65
|
+
* humanizeFieldType('reference', 'Account'); // 'Lookup to Account'
|
|
66
|
+
* humanizeFieldType('reference'); // 'Lookup'
|
|
67
|
+
* humanizeFieldType('BOOLEAN'); // 'Checkbox' (case-insensitive)
|
|
68
|
+
* humanizeFieldType('customtype'); // 'Customtype' (title case fallback)
|
|
69
|
+
* humanizeFieldType(''); // '--'
|
|
70
|
+
* humanizeFieldType(null as unknown as string); // '--'
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
export function humanizeFieldType(fieldType, referenceTo) {
|
|
74
|
+
if (!fieldType) {
|
|
75
|
+
return INVALID_DISPLAY;
|
|
76
|
+
}
|
|
77
|
+
const normalized = fieldType.toLowerCase();
|
|
78
|
+
if (normalized === 'reference' && referenceTo) {
|
|
79
|
+
return `Lookup to ${referenceTo}`;
|
|
80
|
+
}
|
|
81
|
+
const label = FIELD_TYPE_LABELS[normalized];
|
|
82
|
+
if (label) {
|
|
83
|
+
return label;
|
|
84
|
+
}
|
|
85
|
+
// Unknown types: return title case (first letter uppercase, rest lowercase)
|
|
86
|
+
return normalized.charAt(0).toUpperCase() + normalized.slice(1);
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=field-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-types.js","sourceRoot":"","sources":["../../../src/utils/formatting/field-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;GAIG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC;AAEpC;;;;;;GAMG;AACH,MAAM,iBAAiB,GAA2B;IAChD,EAAE,EAAE,IAAI;IACR,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,WAAW;IACrB,OAAO,EAAE,UAAU;IACnB,GAAG,EAAE,SAAS;IACd,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,WAAW;IACrB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,KAAK;IACV,QAAQ,EAAE,UAAU;IACpB,aAAa,EAAE,uBAAuB;IACtC,SAAS,EAAE,QAAQ;IACnB,YAAY,EAAE,eAAe;IAC7B,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;IACpB,eAAe,EAAE,gBAAgB;IACjC,QAAQ,EAAE,aAAa;IACvB,OAAO,EAAE,SAAS;IAClB,YAAY,EAAE,eAAe;IAC7B,IAAI,EAAE,WAAW;CAClB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,iBAAiB,CAAC,SAAiB,EAAE,WAA2B;IAC9E,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,eAAe,CAAC;IACzB,CAAC;IAED,MAAM,UAAU,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC;IAE3C,IAAI,UAAU,KAAK,WAAW,IAAI,WAAW,EAAE,CAAC;QAC9C,OAAO,aAAa,WAAW,EAAE,CAAC;IACpC,CAAC;IAED,MAAM,KAAK,GAAG,iBAAiB,CAAC,UAAU,CAAC,CAAC;IAC5C,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,KAAK,CAAC;IACf,CAAC;IAED,4EAA4E;IAC5E,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared formatting utilities for CLI display output.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all formatting primitives from individual modules.
|
|
5
|
+
* Commands import from this barrel to access consistent formatting
|
|
6
|
+
* across the CLI.
|
|
7
|
+
*
|
|
8
|
+
* @module utils/formatting
|
|
9
|
+
*/
|
|
10
|
+
export { formatNumber, formatCompact, formatPercent, formatBytes } from './numbers.js';
|
|
11
|
+
export { sectionHeader, sectionHeaderWithCount, sectionSeparator, keyValue, bulletList, SECTION_GAP_LINES, logSectionGap, } from './sections.js';
|
|
12
|
+
export type { KeyValueOptions } from './sections.js';
|
|
13
|
+
export { statusSymbol, booleanDisplay, volumeIndicator, completenessBar } from './indicators.js';
|
|
14
|
+
export type { BooleanDisplayOptions, BooleanDisplayStyle, VolumeThresholds, StatusType, VolumeLevel, } from './indicators.js';
|
|
15
|
+
export { buildColumns, numberColumn, booleanColumn, renderAlignedTable } from './tables.js';
|
|
16
|
+
export type { ColumnDef, ColumnAlignment } from './tables.js';
|
|
17
|
+
export { formatErrorWithRemediation } from './errors.js';
|
|
18
|
+
export type { ErrorRemediationOptions } from './errors.js';
|
|
19
|
+
export { formatEmptyState } from './empty-states.js';
|
|
20
|
+
export type { EmptyStateOptions } from './empty-states.js';
|
|
21
|
+
export { renderSummaryBox, displaySummaryBox, renderCompletionMessage, renderWarningBlock, renderOrgContext, renderContextualHeader, } from './command-display.js';
|
|
22
|
+
export type { SummaryEntry, SummaryBoxOptions, CompletionMessageOptions, WarningBlockOptions, OrgContext, ContextualHeaderOptions, } from './command-display.js';
|
|
23
|
+
export { loadingMessage } from './loading-messages.js';
|
|
24
|
+
export { formatNamespace } from './namespace-display.js';
|
|
25
|
+
export type { NamespaceDisplayOptions } from './namespace-display.js';
|
|
26
|
+
export { buildRecordAgeColumns, buildRecordAgeTableData } from './record-age-grid.js';
|
|
27
|
+
export type { RecordAgeTableRow } from './record-age-grid.js';
|
|
28
|
+
export { buildBusinessProcessColumns, buildBusinessProcessTableData } from './business-process-grid.js';
|
|
29
|
+
export type { BusinessProcessGridEntry } from './business-process-grid.js';
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
* Shared formatting utilities for CLI display output.
|
|
10
|
+
*
|
|
11
|
+
* Re-exports all formatting primitives from individual modules.
|
|
12
|
+
* Commands import from this barrel to access consistent formatting
|
|
13
|
+
* across the CLI.
|
|
14
|
+
*
|
|
15
|
+
* @module utils/formatting
|
|
16
|
+
*/
|
|
17
|
+
export { formatNumber, formatCompact, formatPercent, formatBytes } from './numbers.js';
|
|
18
|
+
export { sectionHeader, sectionHeaderWithCount, sectionSeparator, keyValue, bulletList, SECTION_GAP_LINES, logSectionGap, } from './sections.js';
|
|
19
|
+
export { statusSymbol, booleanDisplay, volumeIndicator, completenessBar } from './indicators.js';
|
|
20
|
+
export { buildColumns, numberColumn, booleanColumn, renderAlignedTable } from './tables.js';
|
|
21
|
+
export { formatErrorWithRemediation } from './errors.js';
|
|
22
|
+
export { formatEmptyState } from './empty-states.js';
|
|
23
|
+
export { renderSummaryBox, displaySummaryBox, renderCompletionMessage, renderWarningBlock, renderOrgContext, renderContextualHeader, } from './command-display.js';
|
|
24
|
+
export { loadingMessage } from './loading-messages.js';
|
|
25
|
+
export { formatNamespace } from './namespace-display.js';
|
|
26
|
+
export { buildRecordAgeColumns, buildRecordAgeTableData } from './record-age-grid.js';
|
|
27
|
+
export { buildBusinessProcessColumns, buildBusinessProcessTableData } from './business-process-grid.js';
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/formatting/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;GAQG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACvF,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,iBAAiB,EACjB,aAAa,GACd,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAQjG,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAE5F,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAS9B,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEtF,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure status indicator formatting utilities for CLI display output.
|
|
3
|
+
*
|
|
4
|
+
* All functions are pure (no side effects, no external state) and return
|
|
5
|
+
* formatted strings or labels for consistent status presentation across commands.
|
|
6
|
+
*
|
|
7
|
+
* @module utils/formatting/indicators
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Status types supported by the status symbol formatter.
|
|
11
|
+
*/
|
|
12
|
+
export type StatusType = 'success' | 'error' | 'warning' | 'info' | 'pending' | 'skip';
|
|
13
|
+
/**
|
|
14
|
+
* Display style options for boolean formatting.
|
|
15
|
+
*/
|
|
16
|
+
export type BooleanDisplayStyle = 'yesNo' | 'enabledDisabled' | 'symbol';
|
|
17
|
+
/**
|
|
18
|
+
* Options for controlling boolean display formatting.
|
|
19
|
+
*/
|
|
20
|
+
export type BooleanDisplayOptions = {
|
|
21
|
+
/** The display style to use. Default: 'yesNo'. */
|
|
22
|
+
readonly style?: BooleanDisplayStyle;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Volume level labels returned by the volume indicator.
|
|
26
|
+
*/
|
|
27
|
+
export type VolumeLevel = 'none' | 'low' | 'medium' | 'high';
|
|
28
|
+
/**
|
|
29
|
+
* Configurable thresholds for volume classification.
|
|
30
|
+
*/
|
|
31
|
+
export type VolumeThresholds = {
|
|
32
|
+
/** Upper bound for 'low' volume (inclusive). Default: 100. */
|
|
33
|
+
readonly low?: number;
|
|
34
|
+
/** Upper bound for 'medium' volume (inclusive). Default: 10000. */
|
|
35
|
+
readonly medium?: number;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Returns a unicode symbol with a descriptive label for a given status.
|
|
39
|
+
*
|
|
40
|
+
* Maps each status type to a consistent symbol + text representation
|
|
41
|
+
* suitable for CLI output.
|
|
42
|
+
*
|
|
43
|
+
* @param status - The status type to display
|
|
44
|
+
* @returns A formatted status string, e.g. "✓ Success", "✗ Error"
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* statusSymbol('success') // "✓ Success"
|
|
48
|
+
* statusSymbol('error') // "✗ Error"
|
|
49
|
+
* statusSymbol('warning') // "! Warning"
|
|
50
|
+
* statusSymbol('info') // "i Info"
|
|
51
|
+
* statusSymbol('pending') // "○ Pending"
|
|
52
|
+
*/
|
|
53
|
+
export declare function statusSymbol(status: StatusType): string;
|
|
54
|
+
/**
|
|
55
|
+
* Renders a boolean value as a human-readable display string.
|
|
56
|
+
*
|
|
57
|
+
* Supports multiple display styles: yes/no, enabled/disabled, and unicode symbols.
|
|
58
|
+
* Defaults to 'yesNo' style when no options are provided.
|
|
59
|
+
*
|
|
60
|
+
* @param value - The boolean value to display
|
|
61
|
+
* @param options - Display style options
|
|
62
|
+
* @returns A formatted boolean string, e.g. "Yes", "Disabled", "✓"
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* booleanDisplay(true) // "Yes"
|
|
66
|
+
* booleanDisplay(false) // "No"
|
|
67
|
+
* booleanDisplay(true, { style: 'enabledDisabled' }) // "Enabled"
|
|
68
|
+
* booleanDisplay(false, { style: 'symbol' }) // "✗"
|
|
69
|
+
*/
|
|
70
|
+
export declare function booleanDisplay(value: boolean, options?: BooleanDisplayOptions): string;
|
|
71
|
+
/**
|
|
72
|
+
* Classifies a count into a volume level based on configurable thresholds.
|
|
73
|
+
*
|
|
74
|
+
* Returns 'none' for zero, 'low' for counts up to the low threshold,
|
|
75
|
+
* 'medium' for counts up to the medium threshold, and 'high' for counts
|
|
76
|
+
* above the medium threshold.
|
|
77
|
+
*
|
|
78
|
+
* Negative counts are treated as 'none'.
|
|
79
|
+
*
|
|
80
|
+
* @param count - The count to classify
|
|
81
|
+
* @param thresholds - Optional custom thresholds (low default: 100, medium default: 10000)
|
|
82
|
+
* @returns The volume level: 'none', 'low', 'medium', or 'high'
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* volumeIndicator(0) // "none"
|
|
86
|
+
* volumeIndicator(50) // "low"
|
|
87
|
+
* volumeIndicator(5000) // "medium"
|
|
88
|
+
* volumeIndicator(50000) // "high"
|
|
89
|
+
* volumeIndicator(50, { low: 10, medium: 100 }) // "medium"
|
|
90
|
+
*/
|
|
91
|
+
export declare function volumeIndicator(count: number, thresholds?: VolumeThresholds): VolumeLevel;
|
|
92
|
+
/**
|
|
93
|
+
* Generates an ASCII progress bar with a percentage label.
|
|
94
|
+
*
|
|
95
|
+
* The bar is rendered using filled (█) and empty (░) block characters
|
|
96
|
+
* within square brackets, followed by the percentage. Handles edge cases:
|
|
97
|
+
* - 0/0 returns an empty bar at 0%
|
|
98
|
+
* - Negative values are clamped to 0%
|
|
99
|
+
* - Values exceeding total are clamped to 100%
|
|
100
|
+
*
|
|
101
|
+
* @param current - The current progress value
|
|
102
|
+
* @param total - The total/target value
|
|
103
|
+
* @param width - The bar width in characters (default: 20)
|
|
104
|
+
* @returns A formatted progress bar string, e.g. "[████████░░░░░░░░░░░░] 40%"
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* completenessBar(40, 100) // "[████████░░░░░░░░░░░░] 40%"
|
|
108
|
+
* completenessBar(100, 100) // "[████████████████████] 100%"
|
|
109
|
+
* completenessBar(0, 100) // "[░░░░░░░░░░░░░░░░░░░░] 0%"
|
|
110
|
+
* completenessBar(0, 0) // "[░░░░░░░░░░░░░░░░░░░░] 0%"
|
|
111
|
+
* completenessBar(150, 100) // "[████████████████████] 100%"
|
|
112
|
+
*/
|
|
113
|
+
export declare function completenessBar(current: number, total: number, width?: number): string;
|
|
@@ -0,0 +1,161 @@
|
|
|
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
|
+
* Mapping from status type to unicode symbol and label.
|
|
10
|
+
*/
|
|
11
|
+
const STATUS_MAP = {
|
|
12
|
+
success: { symbol: '\u2713', label: 'Success' },
|
|
13
|
+
error: { symbol: '\u2717', label: 'Error' },
|
|
14
|
+
warning: { symbol: '!', label: 'Warning' },
|
|
15
|
+
info: { symbol: 'i', label: 'Info' },
|
|
16
|
+
pending: { symbol: '\u25CB', label: 'Pending' },
|
|
17
|
+
skip: { symbol: '\u2192', label: 'Skip' },
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Boolean display renderings indexed by style and truthiness.
|
|
21
|
+
*/
|
|
22
|
+
const BOOLEAN_DISPLAY_MAP = {
|
|
23
|
+
yesNo: { trueValue: 'Yes', falseValue: 'No' },
|
|
24
|
+
enabledDisabled: { trueValue: 'Enabled', falseValue: 'Disabled' },
|
|
25
|
+
symbol: { trueValue: '\u2713', falseValue: '\u2717' },
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Default volume thresholds.
|
|
29
|
+
*/
|
|
30
|
+
const DEFAULT_VOLUME_THRESHOLDS = {
|
|
31
|
+
low: 100,
|
|
32
|
+
medium: 10_000,
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Default progress bar width in characters.
|
|
36
|
+
*/
|
|
37
|
+
const DEFAULT_BAR_WIDTH = 20;
|
|
38
|
+
/**
|
|
39
|
+
* Character used for the filled portion of the progress bar.
|
|
40
|
+
*/
|
|
41
|
+
const FILLED_CHAR = '\u2588';
|
|
42
|
+
/**
|
|
43
|
+
* Character used for the empty portion of the progress bar.
|
|
44
|
+
*/
|
|
45
|
+
const EMPTY_CHAR = '\u2591';
|
|
46
|
+
/**
|
|
47
|
+
* Returns a unicode symbol with a descriptive label for a given status.
|
|
48
|
+
*
|
|
49
|
+
* Maps each status type to a consistent symbol + text representation
|
|
50
|
+
* suitable for CLI output.
|
|
51
|
+
*
|
|
52
|
+
* @param status - The status type to display
|
|
53
|
+
* @returns A formatted status string, e.g. "✓ Success", "✗ Error"
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* statusSymbol('success') // "✓ Success"
|
|
57
|
+
* statusSymbol('error') // "✗ Error"
|
|
58
|
+
* statusSymbol('warning') // "! Warning"
|
|
59
|
+
* statusSymbol('info') // "i Info"
|
|
60
|
+
* statusSymbol('pending') // "○ Pending"
|
|
61
|
+
*/
|
|
62
|
+
export function statusSymbol(status) {
|
|
63
|
+
const entry = STATUS_MAP[status];
|
|
64
|
+
return `${entry.symbol} ${entry.label}`;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Renders a boolean value as a human-readable display string.
|
|
68
|
+
*
|
|
69
|
+
* Supports multiple display styles: yes/no, enabled/disabled, and unicode symbols.
|
|
70
|
+
* Defaults to 'yesNo' style when no options are provided.
|
|
71
|
+
*
|
|
72
|
+
* @param value - The boolean value to display
|
|
73
|
+
* @param options - Display style options
|
|
74
|
+
* @returns A formatted boolean string, e.g. "Yes", "Disabled", "✓"
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* booleanDisplay(true) // "Yes"
|
|
78
|
+
* booleanDisplay(false) // "No"
|
|
79
|
+
* booleanDisplay(true, { style: 'enabledDisabled' }) // "Enabled"
|
|
80
|
+
* booleanDisplay(false, { style: 'symbol' }) // "✗"
|
|
81
|
+
*/
|
|
82
|
+
export function booleanDisplay(value, options) {
|
|
83
|
+
const style = options?.style ?? 'yesNo';
|
|
84
|
+
const mapping = BOOLEAN_DISPLAY_MAP[style];
|
|
85
|
+
return value ? mapping.trueValue : mapping.falseValue;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Classifies a count into a volume level based on configurable thresholds.
|
|
89
|
+
*
|
|
90
|
+
* Returns 'none' for zero, 'low' for counts up to the low threshold,
|
|
91
|
+
* 'medium' for counts up to the medium threshold, and 'high' for counts
|
|
92
|
+
* above the medium threshold.
|
|
93
|
+
*
|
|
94
|
+
* Negative counts are treated as 'none'.
|
|
95
|
+
*
|
|
96
|
+
* @param count - The count to classify
|
|
97
|
+
* @param thresholds - Optional custom thresholds (low default: 100, medium default: 10000)
|
|
98
|
+
* @returns The volume level: 'none', 'low', 'medium', or 'high'
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* volumeIndicator(0) // "none"
|
|
102
|
+
* volumeIndicator(50) // "low"
|
|
103
|
+
* volumeIndicator(5000) // "medium"
|
|
104
|
+
* volumeIndicator(50000) // "high"
|
|
105
|
+
* volumeIndicator(50, { low: 10, medium: 100 }) // "medium"
|
|
106
|
+
*/
|
|
107
|
+
export function volumeIndicator(count, thresholds) {
|
|
108
|
+
if (count <= 0) {
|
|
109
|
+
return 'none';
|
|
110
|
+
}
|
|
111
|
+
const low = thresholds?.low ?? DEFAULT_VOLUME_THRESHOLDS.low;
|
|
112
|
+
const medium = thresholds?.medium ?? DEFAULT_VOLUME_THRESHOLDS.medium;
|
|
113
|
+
if (count <= low) {
|
|
114
|
+
return 'low';
|
|
115
|
+
}
|
|
116
|
+
if (count <= medium) {
|
|
117
|
+
return 'medium';
|
|
118
|
+
}
|
|
119
|
+
return 'high';
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Generates an ASCII progress bar with a percentage label.
|
|
123
|
+
*
|
|
124
|
+
* The bar is rendered using filled (█) and empty (░) block characters
|
|
125
|
+
* within square brackets, followed by the percentage. Handles edge cases:
|
|
126
|
+
* - 0/0 returns an empty bar at 0%
|
|
127
|
+
* - Negative values are clamped to 0%
|
|
128
|
+
* - Values exceeding total are clamped to 100%
|
|
129
|
+
*
|
|
130
|
+
* @param current - The current progress value
|
|
131
|
+
* @param total - The total/target value
|
|
132
|
+
* @param width - The bar width in characters (default: 20)
|
|
133
|
+
* @returns A formatted progress bar string, e.g. "[████████░░░░░░░░░░░░] 40%"
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* completenessBar(40, 100) // "[████████░░░░░░░░░░░░] 40%"
|
|
137
|
+
* completenessBar(100, 100) // "[████████████████████] 100%"
|
|
138
|
+
* completenessBar(0, 100) // "[░░░░░░░░░░░░░░░░░░░░] 0%"
|
|
139
|
+
* completenessBar(0, 0) // "[░░░░░░░░░░░░░░░░░░░░] 0%"
|
|
140
|
+
* completenessBar(150, 100) // "[████████████████████] 100%"
|
|
141
|
+
*/
|
|
142
|
+
export function completenessBar(current, total, width = DEFAULT_BAR_WIDTH) {
|
|
143
|
+
const effectiveWidth = Math.max(1, Math.floor(width));
|
|
144
|
+
let ratio;
|
|
145
|
+
if (total <= 0 || current <= 0) {
|
|
146
|
+
ratio = 0;
|
|
147
|
+
}
|
|
148
|
+
else if (current >= total) {
|
|
149
|
+
ratio = 1;
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
ratio = current / total;
|
|
153
|
+
}
|
|
154
|
+
const percentage = Math.round(ratio * 100);
|
|
155
|
+
const filledCount = Math.round(ratio * effectiveWidth);
|
|
156
|
+
const emptyCount = effectiveWidth - filledCount;
|
|
157
|
+
const filled = FILLED_CHAR.repeat(filledCount);
|
|
158
|
+
const empty = EMPTY_CHAR.repeat(emptyCount);
|
|
159
|
+
return `[${filled}${empty}] ${percentage}%`;
|
|
160
|
+
}
|
|
161
|
+
//# sourceMappingURL=indicators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indicators.js","sourceRoot":"","sources":["../../../src/utils/formatting/indicators.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAgBH;;GAEG;AACH,MAAM,UAAU,GAAsF;IACpG,OAAO,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE;IAC/C,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;IAC3C,OAAO,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;IAC1C,IAAI,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE;IACpC,OAAO,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE;IAC/C,IAAI,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE;CAC1C,CAAC;AAeF;;GAEG;AACH,MAAM,mBAAmB,GAErB;IACF,KAAK,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;IAC7C,eAAe,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE;IACjE,MAAM,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE;CACtD,CAAC;AAiBF;;GAEG;AACH,MAAM,yBAAyB,GAAG;IAChC,GAAG,EAAE,GAAG;IACR,MAAM,EAAE,MAAM;CACN,CAAC;AAEX;;GAEG;AACH,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAE7B;;GAEG;AACH,MAAM,WAAW,GAAG,QAAQ,CAAC;AAE7B;;GAEG;AACH,MAAM,UAAU,GAAG,QAAQ,CAAC;AAE5B;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,YAAY,CAAC,MAAkB;IAC7C,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IACjC,OAAO,GAAG,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;AAC1C,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc,EAAE,OAA+B;IAC5E,MAAM,KAAK,GAAG,OAAO,EAAE,KAAK,IAAI,OAAO,CAAC;IACxC,MAAM,OAAO,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAC3C,OAAO,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AACxD,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,eAAe,CAAC,KAAa,EAAE,UAA6B;IAC1E,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,GAAG,GAAG,UAAU,EAAE,GAAG,IAAI,yBAAyB,CAAC,GAAG,CAAC;IAC7D,MAAM,MAAM,GAAG,UAAU,EAAE,MAAM,IAAI,yBAAyB,CAAC,MAAM,CAAC;IAEtE,IAAI,KAAK,IAAI,GAAG,EAAE,CAAC;QACjB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,KAAK,IAAI,MAAM,EAAE,CAAC;QACpB,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,eAAe,CAAC,OAAe,EAAE,KAAa,EAAE,QAAgB,iBAAiB;IAC/F,MAAM,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IAEtD,IAAI,KAAa,CAAC;IAClB,IAAI,KAAK,IAAI,CAAC,IAAI,OAAO,IAAI,CAAC,EAAE,CAAC;QAC/B,KAAK,GAAG,CAAC,CAAC;IACZ,CAAC;SAAM,IAAI,OAAO,IAAI,KAAK,EAAE,CAAC;QAC5B,KAAK,GAAG,CAAC,CAAC;IACZ,CAAC;SAAM,CAAC;QACN,KAAK,GAAG,OAAO,GAAG,KAAK,CAAC;IAC1B,CAAC;IAED,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC;IAC3C,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,cAAc,CAAC,CAAC;IACvD,MAAM,UAAU,GAAG,cAAc,GAAG,WAAW,CAAC;IAEhD,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAC/C,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAE5C,OAAO,IAAI,MAAM,GAAG,KAAK,KAAK,UAAU,GAAG,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure loading message formatting utilities for CLI progress output.
|
|
3
|
+
*
|
|
4
|
+
* Generates contextual loading messages that describe what the CLI
|
|
5
|
+
* is doing, on what subject, and optionally in which org.
|
|
6
|
+
*
|
|
7
|
+
* All functions are pure (no side effects, no external state) and return
|
|
8
|
+
* formatted strings.
|
|
9
|
+
*
|
|
10
|
+
* @module utils/formatting/loading-messages
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Generates a contextual loading message for CLI progress display.
|
|
14
|
+
*
|
|
15
|
+
* Produces a human-readable string describing the current operation,
|
|
16
|
+
* suitable for use with spinners or progress indicators. The message
|
|
17
|
+
* follows the pattern: "Action Subject from OrgAlias..." or
|
|
18
|
+
* "Action Subject..." when no org is provided.
|
|
19
|
+
*
|
|
20
|
+
* @param action - The verb describing the operation (e.g. "Analyzing", "Fetching", "Exporting")
|
|
21
|
+
* @param subject - The target of the operation (e.g. "Account", "definitions", "field metadata")
|
|
22
|
+
* @param org - Optional org alias or username for context
|
|
23
|
+
* @returns A formatted loading message string ending with "..."
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* loadingMessage('Analyzing', 'Account', 'myOrg')
|
|
27
|
+
* // "Analyzing Account from myOrg..."
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* loadingMessage('Fetching', 'field metadata')
|
|
31
|
+
* // "Fetching field metadata..."
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* loadingMessage('Exporting', '42 definitions', 'prod')
|
|
35
|
+
* // "Exporting 42 definitions from prod..."
|
|
36
|
+
*/
|
|
37
|
+
export declare function loadingMessage(action: string, subject: string, org?: string): string;
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
* Pure loading message formatting utilities for CLI progress output.
|
|
10
|
+
*
|
|
11
|
+
* Generates contextual loading messages that describe what the CLI
|
|
12
|
+
* is doing, on what subject, and optionally in which org.
|
|
13
|
+
*
|
|
14
|
+
* All functions are pure (no side effects, no external state) and return
|
|
15
|
+
* formatted strings.
|
|
16
|
+
*
|
|
17
|
+
* @module utils/formatting/loading-messages
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Generates a contextual loading message for CLI progress display.
|
|
21
|
+
*
|
|
22
|
+
* Produces a human-readable string describing the current operation,
|
|
23
|
+
* suitable for use with spinners or progress indicators. The message
|
|
24
|
+
* follows the pattern: "Action Subject from OrgAlias..." or
|
|
25
|
+
* "Action Subject..." when no org is provided.
|
|
26
|
+
*
|
|
27
|
+
* @param action - The verb describing the operation (e.g. "Analyzing", "Fetching", "Exporting")
|
|
28
|
+
* @param subject - The target of the operation (e.g. "Account", "definitions", "field metadata")
|
|
29
|
+
* @param org - Optional org alias or username for context
|
|
30
|
+
* @returns A formatted loading message string ending with "..."
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* loadingMessage('Analyzing', 'Account', 'myOrg')
|
|
34
|
+
* // "Analyzing Account from myOrg..."
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* loadingMessage('Fetching', 'field metadata')
|
|
38
|
+
* // "Fetching field metadata..."
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* loadingMessage('Exporting', '42 definitions', 'prod')
|
|
42
|
+
* // "Exporting 42 definitions from prod..."
|
|
43
|
+
*/
|
|
44
|
+
export function loadingMessage(action, subject, org) {
|
|
45
|
+
if (org !== undefined && org.trim() !== '') {
|
|
46
|
+
return `${action} ${subject} from ${org.trim()}...`;
|
|
47
|
+
}
|
|
48
|
+
return `${action} ${subject}...`;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=loading-messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loading-messages.js","sourceRoot":"","sources":["../../../src/utils/formatting/loading-messages.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;GAUG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,cAAc,CAAC,MAAc,EAAE,OAAe,EAAE,GAAY;IAC1E,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QAC3C,OAAO,GAAG,MAAM,IAAI,OAAO,SAAS,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC;IACtD,CAAC;IACD,OAAO,GAAG,MAAM,IAAI,OAAO,KAAK,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options for controlling namespace display formatting.
|
|
3
|
+
*/
|
|
4
|
+
export type NamespaceDisplayOptions = {
|
|
5
|
+
/** Show the raw namespace prefix alongside the product name. Default: false. */
|
|
6
|
+
readonly showPrefix?: boolean;
|
|
7
|
+
/** Label to use for objects with no namespace (platform-native). Default: "Standard". */
|
|
8
|
+
readonly standardLabel?: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Formats a Salesforce namespace prefix into a human-readable display string.
|
|
12
|
+
*
|
|
13
|
+
* Resolves known namespace prefixes to their product names using the
|
|
14
|
+
* namespace constants map. Unknown namespaces are returned as-is.
|
|
15
|
+
* Null/undefined/empty namespaces return the standard label.
|
|
16
|
+
*
|
|
17
|
+
* @param namespace - The namespace prefix (with or without trailing underscores),
|
|
18
|
+
* or null/undefined for standard objects
|
|
19
|
+
* @param options - Display formatting options
|
|
20
|
+
* @returns A human-readable string representing the namespace
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* formatNamespace('FinServ__') // "Financial Services Cloud"
|
|
24
|
+
* formatNamespace('SBQQ__') // "Salesforce CPQ"
|
|
25
|
+
* formatNamespace('SBQQ__', { showPrefix: true }) // "Salesforce CPQ (SBQQ__)"
|
|
26
|
+
* formatNamespace(null) // "Standard"
|
|
27
|
+
* formatNamespace('') // "Standard"
|
|
28
|
+
* formatNamespace('Unknown__') // "Unknown__"
|
|
29
|
+
* formatNamespace(null, { standardLabel: 'Platform' }) // "Platform"
|
|
30
|
+
*/
|
|
31
|
+
export declare function formatNamespace(namespace: string | null | undefined, options?: NamespaceDisplayOptions): string;
|
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
* Pure namespace display formatting utilities for CLI output.
|
|
10
|
+
*
|
|
11
|
+
* Transforms raw Salesforce namespace prefixes into human-readable
|
|
12
|
+
* product names for display in CLI tables, summaries, and details views.
|
|
13
|
+
*
|
|
14
|
+
* Composes Phase A namespace-constants with display formatting.
|
|
15
|
+
*
|
|
16
|
+
* All functions are pure (no side effects, no external state) and return
|
|
17
|
+
* formatted strings.
|
|
18
|
+
*
|
|
19
|
+
* @module utils/formatting/namespace-display
|
|
20
|
+
*/
|
|
21
|
+
import { getProductName } from '../../services/namespace-constants.js';
|
|
22
|
+
/**
|
|
23
|
+
* Default label for objects with no namespace prefix.
|
|
24
|
+
*/
|
|
25
|
+
const DEFAULT_STANDARD_LABEL = 'Standard';
|
|
26
|
+
/**
|
|
27
|
+
* Formats a Salesforce namespace prefix into a human-readable display string.
|
|
28
|
+
*
|
|
29
|
+
* Resolves known namespace prefixes to their product names using the
|
|
30
|
+
* namespace constants map. Unknown namespaces are returned as-is.
|
|
31
|
+
* Null/undefined/empty namespaces return the standard label.
|
|
32
|
+
*
|
|
33
|
+
* @param namespace - The namespace prefix (with or without trailing underscores),
|
|
34
|
+
* or null/undefined for standard objects
|
|
35
|
+
* @param options - Display formatting options
|
|
36
|
+
* @returns A human-readable string representing the namespace
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* formatNamespace('FinServ__') // "Financial Services Cloud"
|
|
40
|
+
* formatNamespace('SBQQ__') // "Salesforce CPQ"
|
|
41
|
+
* formatNamespace('SBQQ__', { showPrefix: true }) // "Salesforce CPQ (SBQQ__)"
|
|
42
|
+
* formatNamespace(null) // "Standard"
|
|
43
|
+
* formatNamespace('') // "Standard"
|
|
44
|
+
* formatNamespace('Unknown__') // "Unknown__"
|
|
45
|
+
* formatNamespace(null, { standardLabel: 'Platform' }) // "Platform"
|
|
46
|
+
*/
|
|
47
|
+
export function formatNamespace(namespace, options) {
|
|
48
|
+
const standardLabel = options?.standardLabel ?? DEFAULT_STANDARD_LABEL;
|
|
49
|
+
// Null, undefined, or empty → standard
|
|
50
|
+
if (namespace == null || namespace.trim() === '') {
|
|
51
|
+
return standardLabel;
|
|
52
|
+
}
|
|
53
|
+
const trimmed = namespace.trim();
|
|
54
|
+
const productName = getProductName(trimmed);
|
|
55
|
+
if (productName === undefined) {
|
|
56
|
+
// Unknown namespace — return raw prefix
|
|
57
|
+
return trimmed;
|
|
58
|
+
}
|
|
59
|
+
if (options?.showPrefix === true) {
|
|
60
|
+
return `${productName} (${trimmed})`;
|
|
61
|
+
}
|
|
62
|
+
return productName;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=namespace-display.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"namespace-display.js","sourceRoot":"","sources":["../../../src/utils/formatting/namespace-display.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAYvE;;GAEG;AACH,MAAM,sBAAsB,GAAG,UAAU,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,eAAe,CAAC,SAAoC,EAAE,OAAiC;IACrG,MAAM,aAAa,GAAG,OAAO,EAAE,aAAa,IAAI,sBAAsB,CAAC;IAEvE,uCAAuC;IACvC,IAAI,SAAS,IAAI,IAAI,IAAI,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACjD,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC;IACjC,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IAE5C,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;QAC9B,wCAAwC;QACxC,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,IAAI,OAAO,EAAE,UAAU,KAAK,IAAI,EAAE,CAAC;QACjC,OAAO,GAAG,WAAW,KAAK,OAAO,GAAG,CAAC;IACvC,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC"}
|