@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,188 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types for the `sf cuneiform user details` command result.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from the command file so that display formatters (utils layer)
|
|
5
|
+
* can consume these types without importing from the commands layer.
|
|
6
|
+
*
|
|
7
|
+
* @module models/user-details-types
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Org context information for JSON output.
|
|
11
|
+
*/
|
|
12
|
+
export type OrgContextResult = {
|
|
13
|
+
/** Organization name */
|
|
14
|
+
orgName: string;
|
|
15
|
+
/** 18-character Organization ID */
|
|
16
|
+
orgId: string;
|
|
17
|
+
/** Instance URL (e.g., https://acme.my.salesforce.com) */
|
|
18
|
+
instanceUrl: string;
|
|
19
|
+
/** Whether this is a sandbox org */
|
|
20
|
+
isSandbox: boolean;
|
|
21
|
+
/** Organization type (e.g., Developer Edition, Enterprise Edition) */
|
|
22
|
+
orgType: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* User identity information for JSON output.
|
|
26
|
+
*/
|
|
27
|
+
export type UserIdentityResult = {
|
|
28
|
+
/** Salesforce User ID */
|
|
29
|
+
id: string;
|
|
30
|
+
/** User's login username */
|
|
31
|
+
username: string;
|
|
32
|
+
/** User's email address */
|
|
33
|
+
email: string;
|
|
34
|
+
/** Name of the user's assigned Profile */
|
|
35
|
+
profileName: string;
|
|
36
|
+
/** Name of the user's assigned Role (null if not assigned) */
|
|
37
|
+
roleName: string | null;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Prerequisites check result.
|
|
41
|
+
*/
|
|
42
|
+
export type PrerequisitesResult = {
|
|
43
|
+
/** Whether Cuneiform for Salesforce is installed in the org */
|
|
44
|
+
cuneiformInstalled: boolean;
|
|
45
|
+
/** Whether the Admin permission set is assigned */
|
|
46
|
+
adminAccessAssigned: boolean;
|
|
47
|
+
/** Whether all prerequisites passed */
|
|
48
|
+
allPassed: boolean;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Permission set assignment status for JSON output.
|
|
52
|
+
*/
|
|
53
|
+
export type PermissionSetAssignmentResult = {
|
|
54
|
+
/** Full API name with namespace (e.g., pnova__Cuneiform_for_CRM_PRO_Administrative_User) */
|
|
55
|
+
apiName: string;
|
|
56
|
+
/** Human-readable label (e.g., Cuneiform for CRM (Pro): Administrative User) */
|
|
57
|
+
label: string;
|
|
58
|
+
/** Whether the permission set is assigned */
|
|
59
|
+
isAssigned: boolean;
|
|
60
|
+
/** Whether this permission set is required for profiling */
|
|
61
|
+
isRequired: boolean;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Configuration profile status for JSON output.
|
|
65
|
+
*/
|
|
66
|
+
export type ConfigProfileResult = {
|
|
67
|
+
/** Whether a configuration profile is active */
|
|
68
|
+
isConfigured: boolean;
|
|
69
|
+
/** Label of the active profile (null if not configured) */
|
|
70
|
+
profileLabel: string | null;
|
|
71
|
+
/** Whether API-only profiling is enabled (null if not configured) */
|
|
72
|
+
apiOnlyProfilingEnabled: boolean | null;
|
|
73
|
+
/** Whether CLI self-provisioning is enabled (null if not configured) */
|
|
74
|
+
selfRegistrationEnabled: boolean | null;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Readiness assessment combining permission sets and config profile.
|
|
78
|
+
*/
|
|
79
|
+
export type ReadinessResult = {
|
|
80
|
+
/** Whether the user is ready to use Cuneiform */
|
|
81
|
+
isReady: boolean;
|
|
82
|
+
/** Permission set assignment statuses */
|
|
83
|
+
permissionSets: PermissionSetAssignmentResult[];
|
|
84
|
+
/** Configuration profile status */
|
|
85
|
+
configProfile: ConfigProfileResult;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Structured resolution guidance item with persona routing.
|
|
89
|
+
*/
|
|
90
|
+
export type ResolutionGuidanceItem = {
|
|
91
|
+
/** What the issue is */
|
|
92
|
+
issue: string;
|
|
93
|
+
/** Itemized detail lines (rendered as indented bullets) */
|
|
94
|
+
detail?: string[];
|
|
95
|
+
/** What action to take */
|
|
96
|
+
action: string;
|
|
97
|
+
/** Who should take the action */
|
|
98
|
+
persona: 'admin' | 'self';
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Individual configuration action result.
|
|
102
|
+
*/
|
|
103
|
+
export type ConfigurationActionResult = {
|
|
104
|
+
/** Type of action */
|
|
105
|
+
type: 'assignPermissionSet' | 'enableApiOnlyProfiling' | 'unassignPermissionSet' | 'disableApiOnlyProfiling';
|
|
106
|
+
/** Target identifier (permission set name or profile name) */
|
|
107
|
+
target: string;
|
|
108
|
+
/** Human-readable label for the target */
|
|
109
|
+
targetLabel: string;
|
|
110
|
+
/** Action status */
|
|
111
|
+
status: 'applied' | 'skipped' | 'failed' | 'planned';
|
|
112
|
+
/** Status message */
|
|
113
|
+
message?: string;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Snapshot of the user's configuration state captured before --configure actions
|
|
117
|
+
* were planned or applied. Narrowed from the service-level ConfigurationState —
|
|
118
|
+
* userId and username are intentionally omitted because they are already exposed
|
|
119
|
+
* via UserDetailsResult.user. Surfaces the CLI-3418 readiness-threading contract
|
|
120
|
+
* into the JSON output so consumers can verify that the readiness display and
|
|
121
|
+
* configure previousState derive from a single readiness snapshot.
|
|
122
|
+
*/
|
|
123
|
+
export type ConfigurationPreviousState = {
|
|
124
|
+
/** Whether all required permission sets were assigned at snapshot time */
|
|
125
|
+
hasRequiredPermissionSets: boolean;
|
|
126
|
+
/** Names of missing permission sets at snapshot time (empty if all assigned) */
|
|
127
|
+
missingPermissionSets: string[];
|
|
128
|
+
/** Whether API-only profiling was enabled at snapshot time */
|
|
129
|
+
apiOnlyProfilingEnabled: boolean;
|
|
130
|
+
/** Active profile developer name at snapshot time (if configured) */
|
|
131
|
+
profileDeveloperName?: string;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Configuration result (only present when --configure is used).
|
|
135
|
+
*/
|
|
136
|
+
export type ConfigurationResult = {
|
|
137
|
+
/** Whether this was a dry-run (no changes applied) */
|
|
138
|
+
dryRun: boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Configuration state before actions were planned or applied. Surfaces the
|
|
141
|
+
* CLI-3418 readiness-threading contract: this snapshot is built from the same
|
|
142
|
+
* readiness data that drives the readiness display, so consumers can verify
|
|
143
|
+
* agreement between the two surfaces.
|
|
144
|
+
*/
|
|
145
|
+
previousState: ConfigurationPreviousState;
|
|
146
|
+
/** Actions taken or planned */
|
|
147
|
+
actions: ConfigurationActionResult[];
|
|
148
|
+
/** Summary statistics */
|
|
149
|
+
summary: {
|
|
150
|
+
/** Number of changes required */
|
|
151
|
+
changesRequired: number;
|
|
152
|
+
/** Number of changes successfully applied */
|
|
153
|
+
changesApplied: number;
|
|
154
|
+
/** Number of changes that failed */
|
|
155
|
+
changesFailed: number;
|
|
156
|
+
};
|
|
157
|
+
/** Deployment job ID for tracking (if API-only profiling was enabled) */
|
|
158
|
+
deploymentJobId?: string;
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Contextual links for the user.
|
|
162
|
+
*/
|
|
163
|
+
export type LinksResult = {
|
|
164
|
+
/** URL to verification documentation */
|
|
165
|
+
documentation?: string;
|
|
166
|
+
/** URL to installation guide */
|
|
167
|
+
installationGuide?: string;
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* Unified command result type for JSON output.
|
|
171
|
+
* Used by both diagnostic (default) and configure (--configure) modes.
|
|
172
|
+
*/
|
|
173
|
+
export type UserDetailsResult = {
|
|
174
|
+
/** Org context information */
|
|
175
|
+
orgContext: OrgContextResult;
|
|
176
|
+
/** User identity information */
|
|
177
|
+
user: UserIdentityResult;
|
|
178
|
+
/** Prerequisites check result */
|
|
179
|
+
prerequisites: PrerequisitesResult;
|
|
180
|
+
/** Readiness assessment */
|
|
181
|
+
readiness: ReadinessResult;
|
|
182
|
+
/** Structured resolution guidance (empty if ready) */
|
|
183
|
+
resolutionGuidance: ResolutionGuidanceItem[];
|
|
184
|
+
/** Configuration result (only present when --configure is used) */
|
|
185
|
+
configuration?: ConfigurationResult;
|
|
186
|
+
/** Contextual links */
|
|
187
|
+
links: LinksResult;
|
|
188
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=user-details-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-details-types.js","sourceRoot":"","sources":["../../src/models/user-details-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a single comparative year entry within a year range.
|
|
3
|
+
*
|
|
4
|
+
* Each entry defines what "Set A" and "Set B" are for a comparative definition:
|
|
5
|
+
* - Bounded: year vs year-1 (e.g., 2026 vs 2025)
|
|
6
|
+
* - Unbounded: year vs all prior records (e.g., 2023 vs Prior)
|
|
7
|
+
*/
|
|
8
|
+
export type ComparativeYearEntry = {
|
|
9
|
+
/** The target year (Set A: records created in this year) */
|
|
10
|
+
readonly year: number;
|
|
11
|
+
/** When true, Set B is "all records before year" instead of "year - 1" */
|
|
12
|
+
readonly unbounded: boolean;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* A resolved year range for comparative profiling definitions.
|
|
16
|
+
*
|
|
17
|
+
* Contains the ordered list of comparative year entries derived from user input
|
|
18
|
+
* (flags like --year, --depth, --from, --to, --use-prior).
|
|
19
|
+
*
|
|
20
|
+
* Default behavior:
|
|
21
|
+
* - comparative method: depth=1 (current year only)
|
|
22
|
+
* - full method: depth=3 (current year + 2 prior years)
|
|
23
|
+
* - --use-prior replaces the last entry with an unbounded comparison
|
|
24
|
+
*/
|
|
25
|
+
export type YearRange = {
|
|
26
|
+
/** Ordered list of comparative years (most recent first) */
|
|
27
|
+
readonly entries: readonly ComparativeYearEntry[];
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Raw flag inputs for year range resolution.
|
|
31
|
+
* Mirrors the CLI flags before validation and resolution.
|
|
32
|
+
*/
|
|
33
|
+
export type YearRangeInput = {
|
|
34
|
+
/** Single year or comma-delimited years (e.g., 2026 or "2026,2025,2024") */
|
|
35
|
+
year?: number | number[];
|
|
36
|
+
/** Number of years to include (counting back from year) */
|
|
37
|
+
depth?: number;
|
|
38
|
+
/** Start year of explicit range (inclusive) */
|
|
39
|
+
from?: number;
|
|
40
|
+
/** End year of explicit range (inclusive) */
|
|
41
|
+
to?: number;
|
|
42
|
+
/** Replace last comparison with unbounded "vs Prior" */
|
|
43
|
+
usePrior?: boolean;
|
|
44
|
+
/** Profiling method — determines default depth */
|
|
45
|
+
method?: 'metadata' | 'historical' | 'comparative' | 'recordtype' | 'outcome' | 'full';
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Resolves CLI flag inputs into a validated YearRange.
|
|
49
|
+
*
|
|
50
|
+
* Resolution priority:
|
|
51
|
+
* 1. --from/--to: explicit range (inclusive, most recent first)
|
|
52
|
+
* 2. --year (array): comma-delimited years
|
|
53
|
+
* 3. --year + --depth: single year with lookback depth
|
|
54
|
+
* 4. --year alone: single year with method-default depth
|
|
55
|
+
* 5. No flags: current year with method-default depth
|
|
56
|
+
*
|
|
57
|
+
* @param input - Raw flag inputs
|
|
58
|
+
* @returns Resolved YearRange
|
|
59
|
+
* @throws Error if inputs are invalid or conflicting
|
|
60
|
+
*/
|
|
61
|
+
export declare function resolveYearRange(input?: YearRangeInput): YearRange;
|
|
62
|
+
/**
|
|
63
|
+
* Returns the default depth for a given profiling method.
|
|
64
|
+
*
|
|
65
|
+
* - comparative: 1 (current year only)
|
|
66
|
+
* - outcome: 1 (no year dimension — uses filterJson)
|
|
67
|
+
* - full: 3 (current year + 2 prior)
|
|
68
|
+
* - recordtype: 3 (same as full)
|
|
69
|
+
*/
|
|
70
|
+
export declare function getDefaultDepth(method: string): number;
|
|
71
|
+
/**
|
|
72
|
+
* Formats a ComparativeYearEntry as a human-readable string.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* formatYearEntry({ year: 2026, unbounded: false }) // "2026 vs 2025"
|
|
76
|
+
* formatYearEntry({ year: 2023, unbounded: true }) // "2023 vs Prior"
|
|
77
|
+
*/
|
|
78
|
+
export declare function formatYearEntry(entry: ComparativeYearEntry): string;
|
|
@@ -0,0 +1,153 @@
|
|
|
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
|
+
/** Maximum allowed depth to prevent excessive definition creation */
|
|
9
|
+
const MAX_DEPTH = 10;
|
|
10
|
+
/** Minimum valid year */
|
|
11
|
+
const MIN_YEAR = 2000;
|
|
12
|
+
/** Maximum valid year */
|
|
13
|
+
const MAX_YEAR = 2050;
|
|
14
|
+
/**
|
|
15
|
+
* Resolves CLI flag inputs into a validated YearRange.
|
|
16
|
+
*
|
|
17
|
+
* Resolution priority:
|
|
18
|
+
* 1. --from/--to: explicit range (inclusive, most recent first)
|
|
19
|
+
* 2. --year (array): comma-delimited years
|
|
20
|
+
* 3. --year + --depth: single year with lookback depth
|
|
21
|
+
* 4. --year alone: single year with method-default depth
|
|
22
|
+
* 5. No flags: current year with method-default depth
|
|
23
|
+
*
|
|
24
|
+
* @param input - Raw flag inputs
|
|
25
|
+
* @returns Resolved YearRange
|
|
26
|
+
* @throws Error if inputs are invalid or conflicting
|
|
27
|
+
*/
|
|
28
|
+
export function resolveYearRange(input = {}) {
|
|
29
|
+
const method = input.method ?? 'comparative';
|
|
30
|
+
// Metadata has no time dimension — skip year range resolution
|
|
31
|
+
if (method === 'metadata') {
|
|
32
|
+
return { entries: [] };
|
|
33
|
+
}
|
|
34
|
+
const currentYear = new Date().getFullYear();
|
|
35
|
+
// Resolution path 1: --from/--to explicit range
|
|
36
|
+
if (input.from !== undefined || input.to !== undefined) {
|
|
37
|
+
return resolveFromToRange(input, currentYear);
|
|
38
|
+
}
|
|
39
|
+
// Resolution path 2: --year as array (comma-delimited)
|
|
40
|
+
if (Array.isArray(input.year)) {
|
|
41
|
+
return resolveYearArray(input.year, input.usePrior);
|
|
42
|
+
}
|
|
43
|
+
// Resolution path 3/4/5: --year + --depth or defaults
|
|
44
|
+
const baseYear = input.year ?? currentYear;
|
|
45
|
+
const defaultDepth = getDefaultDepth(method);
|
|
46
|
+
const depth = input.depth ?? defaultDepth;
|
|
47
|
+
validateYear(baseYear);
|
|
48
|
+
validateDepth(depth);
|
|
49
|
+
const entries = [];
|
|
50
|
+
for (let i = 0; i < depth; i++) {
|
|
51
|
+
const year = baseYear - i;
|
|
52
|
+
const isLast = i === depth - 1;
|
|
53
|
+
entries.push({
|
|
54
|
+
year,
|
|
55
|
+
unbounded: isLast && (input.usePrior ?? false),
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
return { entries };
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Returns the default depth for a given profiling method.
|
|
62
|
+
*
|
|
63
|
+
* - comparative: 1 (current year only)
|
|
64
|
+
* - outcome: 1 (no year dimension — uses filterJson)
|
|
65
|
+
* - full: 3 (current year + 2 prior)
|
|
66
|
+
* - recordtype: 3 (same as full)
|
|
67
|
+
*/
|
|
68
|
+
export function getDefaultDepth(method) {
|
|
69
|
+
switch (method) {
|
|
70
|
+
case 'comparative':
|
|
71
|
+
case 'outcome':
|
|
72
|
+
return 1;
|
|
73
|
+
case 'full':
|
|
74
|
+
case 'recordtype':
|
|
75
|
+
return 3;
|
|
76
|
+
default:
|
|
77
|
+
return 1;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Formats a ComparativeYearEntry as a human-readable string.
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* formatYearEntry({ year: 2026, unbounded: false }) // "2026 vs 2025"
|
|
85
|
+
* formatYearEntry({ year: 2023, unbounded: true }) // "2023 vs Prior"
|
|
86
|
+
*/
|
|
87
|
+
export function formatYearEntry(entry) {
|
|
88
|
+
if (entry.unbounded) {
|
|
89
|
+
return `${entry.year} vs Prior`;
|
|
90
|
+
}
|
|
91
|
+
return `${entry.year} vs ${entry.year - 1}`;
|
|
92
|
+
}
|
|
93
|
+
// ── Internal helpers ──────────────────────────────────────────────────
|
|
94
|
+
function resolveFromToRange(input, currentYear) {
|
|
95
|
+
const from = input.from ?? MIN_YEAR;
|
|
96
|
+
const to = input.to ?? currentYear;
|
|
97
|
+
validateYear(from);
|
|
98
|
+
validateYear(to);
|
|
99
|
+
if (from > to) {
|
|
100
|
+
throw new Error(`--from (${from}) cannot be greater than --to (${to})`);
|
|
101
|
+
}
|
|
102
|
+
const depth = to - from + 1;
|
|
103
|
+
if (depth > MAX_DEPTH) {
|
|
104
|
+
throw new Error(`Year range spans ${depth} years, exceeding maximum of ${MAX_DEPTH}`);
|
|
105
|
+
}
|
|
106
|
+
if (input.depth !== undefined) {
|
|
107
|
+
throw new Error('--depth cannot be combined with --from/--to');
|
|
108
|
+
}
|
|
109
|
+
const entries = [];
|
|
110
|
+
for (let year = to; year >= from; year--) {
|
|
111
|
+
const isLast = year === from;
|
|
112
|
+
entries.push({
|
|
113
|
+
year,
|
|
114
|
+
unbounded: isLast && (input.usePrior ?? false),
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
return { entries };
|
|
118
|
+
}
|
|
119
|
+
function resolveYearArray(years, usePrior) {
|
|
120
|
+
if (years.length === 0) {
|
|
121
|
+
throw new Error('--year requires at least one year value');
|
|
122
|
+
}
|
|
123
|
+
if (years.length > MAX_DEPTH) {
|
|
124
|
+
throw new Error(`--year specifies ${years.length} years, exceeding maximum of ${MAX_DEPTH}`);
|
|
125
|
+
}
|
|
126
|
+
for (const y of years) {
|
|
127
|
+
validateYear(y);
|
|
128
|
+
}
|
|
129
|
+
// Sort descending (most recent first)
|
|
130
|
+
const sorted = [...years].sort((a, b) => b - a);
|
|
131
|
+
const entries = sorted.map((year, i) => ({
|
|
132
|
+
year,
|
|
133
|
+
unbounded: i === sorted.length - 1 && (usePrior ?? false),
|
|
134
|
+
}));
|
|
135
|
+
return { entries };
|
|
136
|
+
}
|
|
137
|
+
function validateYear(year) {
|
|
138
|
+
if (!Number.isInteger(year)) {
|
|
139
|
+
throw new Error(`Year must be an integer, got ${year}`);
|
|
140
|
+
}
|
|
141
|
+
if (year < MIN_YEAR || year > MAX_YEAR) {
|
|
142
|
+
throw new Error(`Year ${year} is out of range (${MIN_YEAR}-${MAX_YEAR})`);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
function validateDepth(depth) {
|
|
146
|
+
if (!Number.isInteger(depth) || depth < 1) {
|
|
147
|
+
throw new Error(`--depth must be a positive integer, got ${depth}`);
|
|
148
|
+
}
|
|
149
|
+
if (depth > MAX_DEPTH) {
|
|
150
|
+
throw new Error(`--depth ${depth} exceeds maximum of ${MAX_DEPTH}`);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=year-range.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"year-range.js","sourceRoot":"","sources":["../../src/models/year-range.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAmDH,qEAAqE;AACrE,MAAM,SAAS,GAAG,EAAE,CAAC;AAErB,yBAAyB;AACzB,MAAM,QAAQ,GAAG,IAAI,CAAC;AAEtB,yBAAyB;AACzB,MAAM,QAAQ,GAAG,IAAI,CAAC;AAEtB;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,gBAAgB,CAAC,QAAwB,EAAE;IACzD,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,IAAI,aAAa,CAAC;IAE7C,8DAA8D;IAC9D,IAAI,MAAM,KAAK,UAAU,EAAE,CAAC;QAC1B,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACzB,CAAC;IAED,MAAM,WAAW,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAE7C,gDAAgD;IAChD,IAAI,KAAK,CAAC,IAAI,K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K,CAAC,QAAQ,IAAI,qBAAqB,QAAQ,IAAI,QAAQ,GAAG,CAAC,CAAC;IAC5E,CAAC;AACH,CAAC;AAED,SAAS,aAAa,CAAC,KAAa;IAClC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;QAC1C,MAAM,IAAI,KAAK,CAAC,2CAA2C,KAAK,EAAE,CAAC,CAAC;IACtE,CAAC;IACD,IAAI,KAAK,GAAG,SAAS,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,WAAW,KAAK,uBAAuB,SAAS,EAAE,CAAC,CAAC;IACtE,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type ServiceResult } from '../models/service-result.js';
|
|
2
|
+
import { CompatibilityService, type CompatibilityState } from '../services/CompatibilityService.js';
|
|
3
|
+
import { type OrgInfoService } from '../services/OrgInfoService.js';
|
|
4
|
+
/** Error codes specific to the compatibility-check operation. */
|
|
5
|
+
export declare const CompatibilityErrorCodes: {
|
|
6
|
+
/** Manifest is missing required fields (re-raised from CompatibilityService). */
|
|
7
|
+
readonly MANIFEST_INVALID: "E4681";
|
|
8
|
+
/** Manifest CLI version field is missing. */
|
|
9
|
+
readonly CLI_VERSION_MISSING: "E4684";
|
|
10
|
+
/** Failed to query installed package version from the org. */
|
|
11
|
+
readonly ORG_PACKAGE_QUERY_FAILED: "E4683";
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Result payload of the compatibility check.
|
|
15
|
+
*
|
|
16
|
+
* `installed` is present only when an org check was performed (caller passed an
|
|
17
|
+
* `OrgInfoService`). When absent, the result describes only the CLI's
|
|
18
|
+
* requirement (no Salesforce API call was made).
|
|
19
|
+
*/
|
|
20
|
+
export type CompatibilityResult = {
|
|
21
|
+
/** CLI plugin version (from `package.json` `version` field). */
|
|
22
|
+
cliVersion: string;
|
|
23
|
+
/** Display name of the Cuneiform For Salesforce managed package. */
|
|
24
|
+
appName: string;
|
|
25
|
+
/** Minimum-required app version (from `package.json` `cuneiform.requiredAppVersion`). */
|
|
26
|
+
requiredAppVersion: string;
|
|
27
|
+
/** Org-side details, present only when a target org was supplied. */
|
|
28
|
+
installed?: {
|
|
29
|
+
/** Installed version string, or `null` when the package is not installed. */
|
|
30
|
+
version: string | null;
|
|
31
|
+
/** Compatibility outcome relative to the required version. */
|
|
32
|
+
state: CompatibilityState;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
/** Options for {@link CompatibilityCheckOperation.execute}. */
|
|
36
|
+
export type CompatibilityCheckOptions = {
|
|
37
|
+
/**
|
|
38
|
+
* When provided, the operation queries the org for the installed Cuneiform
|
|
39
|
+
* For Salesforce package and includes installed-version detail in the result.
|
|
40
|
+
* When omitted, the result describes only the CLI's requirement.
|
|
41
|
+
*/
|
|
42
|
+
orgInfoService?: OrgInfoService;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Orchestrates compatibility resolution between the running CLI and (optionally)
|
|
46
|
+
* the Cuneiform For Salesforce package installed in a target org.
|
|
47
|
+
*
|
|
48
|
+
* Always returns required and CLI versions. When an `OrgInfoService` is supplied
|
|
49
|
+
* via {@link execute}, also queries `getCuneiformPackageInfo()` and computes the
|
|
50
|
+
* comparison state via {@link CompatibilityService.compare}.
|
|
51
|
+
*/
|
|
52
|
+
export declare class CompatibilityCheckOperation {
|
|
53
|
+
private readonly compatibilityService;
|
|
54
|
+
constructor(compatibilityService: CompatibilityService);
|
|
55
|
+
/**
|
|
56
|
+
* Run the compatibility check.
|
|
57
|
+
*
|
|
58
|
+
* @param options - optionally supply an `OrgInfoService` to query the target org
|
|
59
|
+
* @returns ServiceResult describing the CLI requirement and (when org-checked) the installed state
|
|
60
|
+
*/
|
|
61
|
+
execute(options?: CompatibilityCheckOptions): Promise<ServiceResult<CompatibilityResult>>;
|
|
62
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
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 { SfError } from '@salesforce/core';
|
|
9
|
+
import { createSuccessResult, createFailureResult } from '../models/service-result.js';
|
|
10
|
+
import { CompatibilityService } from '../services/CompatibilityService.js';
|
|
11
|
+
/** Display name of the managed package. Stable — does not vary with version. */
|
|
12
|
+
const APP_NAME = 'Cuneiform For Salesforce';
|
|
13
|
+
/** Error codes specific to the compatibility-check operation. */
|
|
14
|
+
export const CompatibilityErrorCodes = {
|
|
15
|
+
/** Manifest is missing required fields (re-raised from CompatibilityService). */
|
|
16
|
+
MANIFEST_INVALID: 'E4681',
|
|
17
|
+
/** Manifest CLI version field is missing. */
|
|
18
|
+
CLI_VERSION_MISSING: 'E4684',
|
|
19
|
+
/** Failed to query installed package version from the org. */
|
|
20
|
+
ORG_PACKAGE_QUERY_FAILED: 'E4683',
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Orchestrates compatibility resolution between the running CLI and (optionally)
|
|
24
|
+
* the Cuneiform For Salesforce package installed in a target org.
|
|
25
|
+
*
|
|
26
|
+
* Always returns required and CLI versions. When an `OrgInfoService` is supplied
|
|
27
|
+
* via {@link execute}, also queries `getCuneiformPackageInfo()` and computes the
|
|
28
|
+
* comparison state via {@link CompatibilityService.compare}.
|
|
29
|
+
*/
|
|
30
|
+
export class CompatibilityCheckOperation {
|
|
31
|
+
compatibilityService;
|
|
32
|
+
constructor(compatibilityService) {
|
|
33
|
+
this.compatibilityService = compatibilityService;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Run the compatibility check.
|
|
37
|
+
*
|
|
38
|
+
* @param options - optionally supply an `OrgInfoService` to query the target org
|
|
39
|
+
* @returns ServiceResult describing the CLI requirement and (when org-checked) the installed state
|
|
40
|
+
*/
|
|
41
|
+
async execute(options) {
|
|
42
|
+
const startTime = Date.now();
|
|
43
|
+
const fallbackResult = {
|
|
44
|
+
cliVersion: 'unknown',
|
|
45
|
+
appName: APP_NAME,
|
|
46
|
+
requiredAppVersion: 'unknown',
|
|
47
|
+
};
|
|
48
|
+
let cliVersion;
|
|
49
|
+
let requiredVersion;
|
|
50
|
+
try {
|
|
51
|
+
requiredVersion = this.compatibilityService.loadRequired().version;
|
|
52
|
+
cliVersion = this.compatibilityService.loadCliVersion();
|
|
53
|
+
}
|
|
54
|
+
catch (err) {
|
|
55
|
+
const errorCode = err instanceof SfError ? err.name : CompatibilityErrorCodes.MANIFEST_INVALID;
|
|
56
|
+
const errorMessage = err instanceof Error ? err.message : 'Unknown manifest error';
|
|
57
|
+
return createFailureResult(fallbackResult, errorCode, errorMessage, {
|
|
58
|
+
metadata: { duration: Date.now() - startTime },
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
const baseResult = {
|
|
62
|
+
cliVersion,
|
|
63
|
+
appName: APP_NAME,
|
|
64
|
+
requiredAppVersion: requiredVersion,
|
|
65
|
+
};
|
|
66
|
+
const orgInfoService = options?.orgInfoService;
|
|
67
|
+
if (!orgInfoService) {
|
|
68
|
+
return createSuccessResult(baseResult, {
|
|
69
|
+
message: `Required ${APP_NAME} app version: ${requiredVersion}`,
|
|
70
|
+
metadata: { duration: Date.now() - startTime },
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
const pkgResult = await orgInfoService.getCuneiformPackageInfo();
|
|
74
|
+
if (!pkgResult.success) {
|
|
75
|
+
return createFailureResult(baseResult, CompatibilityErrorCodes.ORG_PACKAGE_QUERY_FAILED, pkgResult.message ?? 'Failed to query installed Cuneiform package version', { metadata: { duration: Date.now() - startTime } });
|
|
76
|
+
}
|
|
77
|
+
// CLI-1569: source-pushed scratch orgs return installed=true with no version.
|
|
78
|
+
// Treat as "version-unknown" rather than misreporting as not-installed.
|
|
79
|
+
let installedVersion = null;
|
|
80
|
+
let state;
|
|
81
|
+
if (pkgResult.data.installed && typeof pkgResult.data.version === 'string') {
|
|
82
|
+
installedVersion = pkgResult.data.version;
|
|
83
|
+
state = CompatibilityService.compare(requiredVersion, installedVersion);
|
|
84
|
+
}
|
|
85
|
+
else if (pkgResult.data.installed) {
|
|
86
|
+
// Detected via namespace fallback, no version available.
|
|
87
|
+
state = 'installed-version-unknown';
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
state = 'not-installed';
|
|
91
|
+
}
|
|
92
|
+
const result = {
|
|
93
|
+
...baseResult,
|
|
94
|
+
installed: { version: installedVersion, state },
|
|
95
|
+
};
|
|
96
|
+
return createSuccessResult(result, {
|
|
97
|
+
message: `Compatibility: ${state}`,
|
|
98
|
+
metadata: { duration: Date.now() - startTime },
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=CompatibilityCheckOperation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CompatibilityCheckOperation.js","sourceRoot":"","sources":["../../src/operations/CompatibilityCheckOperation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAsB,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAC3G,OAAO,EAAE,oBAAoB,EAA2B,MAAM,qCAAqC,CAAC;AAGpG,gFAAgF;AAChF,MAAM,QAAQ,GAAG,0BAA0B,CAAC;AAE5C,iEAAiE;AACjE,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,iFAAiF;IACjF,gBAAgB,EAAE,OAAO;IACzB,6CAA6C;IAC7C,mBAAmB,EAAE,OAAO;IAC5B,8DAA8D;IAC9D,wBAAwB,EAAE,OAAO;CACzB,CAAC;AAmCX;;;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