@documentation-robotics/cli 0.1.13 → 0.3.0
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/README.md +74 -2
- package/dist/analysis/relationship-classifier.js +2 -9
- package/dist/analysis/relationship-classifier.js.map +2 -2
- package/dist/analyzers/call-graph-utils.js +2 -2
- package/dist/analyzers/call-graph-utils.js.map +2 -2
- package/dist/analyzers/cards/build.js +171 -0
- package/dist/analyzers/cards/build.js.map +7 -0
- package/dist/analyzers/cards/classify.js +42 -0
- package/dist/analyzers/cards/classify.js.map +7 -0
- package/dist/analyzers/cards/edge-index.js +44 -0
- package/dist/analyzers/cards/edge-index.js.map +7 -0
- package/dist/analyzers/cards/facts.js +46 -0
- package/dist/analyzers/cards/facts.js.map +7 -0
- package/dist/analyzers/cards/graph.js +42 -0
- package/dist/analyzers/cards/graph.js.map +7 -0
- package/dist/analyzers/cards/index.js +8 -0
- package/dist/analyzers/cards/index.js.map +7 -0
- package/dist/analyzers/cards/tier0.js +18 -0
- package/dist/analyzers/cards/tier0.js.map +7 -0
- package/dist/analyzers/cards/types.js +1 -0
- package/dist/analyzers/cards/types.js.map +7 -0
- package/dist/analyzers/cbm-analyzer.js +195 -171
- package/dist/analyzers/cbm-analyzer.js.map +2 -2
- package/dist/analyzers/cbm-responses.js +336 -0
- package/dist/analyzers/cbm-responses.js.map +7 -0
- package/dist/analyzers/edge-relationships.js +45 -0
- package/dist/analyzers/edge-relationships.js.map +7 -0
- package/dist/analyzers/mapping-loader.js +9 -0
- package/dist/analyzers/mapping-loader.js.map +2 -2
- package/dist/analyzers/tier0-rules.js +153 -0
- package/dist/analyzers/tier0-rules.js.map +7 -0
- package/dist/analyzers/types.js.map +1 -1
- package/dist/analyzers/verify-engine.js +22 -19
- package/dist/analyzers/verify-engine.js.map +2 -2
- package/dist/audit/relationships/ai/prompts.js +10 -10
- package/dist/audit/relationships/ai/prompts.js.map +2 -2
- package/dist/audit/relationships/analysis/layer-templates.js +52 -52
- package/dist/audit/relationships/analysis/layer-templates.js.map +1 -1
- package/dist/cli.js +112 -28
- package/dist/cli.js.map +3 -3
- package/dist/coding-agents/agents/claude-code.js +3 -1
- package/dist/coding-agents/agents/claude-code.js.map +2 -2
- package/dist/coding-agents/claude-code-client.js +2 -1
- package/dist/coding-agents/claude-code-client.js.map +2 -2
- package/dist/coding-agents/copilot-client.js +17 -12
- package/dist/coding-agents/copilot-client.js.map +2 -2
- package/dist/coding-agents/default-permissions.js +152 -0
- package/dist/coding-agents/default-permissions.js.map +7 -0
- package/dist/coding-agents/drbot-mcp.js +167 -0
- package/dist/coding-agents/drbot-mcp.js.map +7 -0
- package/dist/commands/add.js +12 -7
- package/dist/commands/add.js.map +2 -2
- package/dist/commands/analyzer.js +134 -23
- package/dist/commands/analyzer.js.map +2 -2
- package/dist/commands/audit.js +6 -6
- package/dist/commands/audit.js.map +2 -2
- package/dist/commands/changeset-verify.js +55 -0
- package/dist/commands/changeset-verify.js.map +7 -0
- package/dist/commands/changeset.js +261 -147
- package/dist/commands/changeset.js.map +2 -2
- package/dist/commands/delete.js +52 -19
- package/dist/commands/delete.js.map +3 -3
- package/dist/commands/element.js +3 -2
- package/dist/commands/element.js.map +2 -2
- package/dist/commands/farm.js +773 -0
- package/dist/commands/farm.js.map +7 -0
- package/dist/commands/init.js +11 -1
- package/dist/commands/init.js.map +2 -2
- package/dist/commands/mcp.js +122 -0
- package/dist/commands/mcp.js.map +7 -0
- package/dist/commands/relationship.js +251 -47
- package/dist/commands/relationship.js.map +2 -2
- package/dist/commands/reports.js +1 -1
- package/dist/commands/reports.js.map +2 -2
- package/dist/commands/update.js +56 -24
- package/dist/commands/update.js.map +2 -2
- package/dist/commands/upgrade.js +99 -11
- package/dist/commands/upgrade.js.map +3 -3
- package/dist/commands/validate.js +41 -3
- package/dist/commands/validate.js.map +2 -2
- package/dist/commands/version.js +2 -2
- package/dist/commands/version.js.map +2 -2
- package/dist/commands/visualize.js +4 -3
- package/dist/commands/visualize.js.map +2 -2
- package/dist/config.js +83 -0
- package/dist/config.js.map +7 -0
- package/dist/core/annotation-store.js +138 -0
- package/dist/core/annotation-store.js.map +7 -0
- package/dist/core/catalog-migration.js +33 -0
- package/dist/core/catalog-migration.js.map +7 -0
- package/dist/core/changeset-analysis.js +421 -0
- package/dist/core/changeset-analysis.js.map +7 -0
- package/dist/core/changeset-base-index.js +153 -0
- package/dist/core/changeset-base-index.js.map +7 -0
- package/dist/core/changeset-brief-delta.js +102 -0
- package/dist/core/changeset-brief-delta.js.map +7 -0
- package/dist/core/changeset-graph.js +281 -0
- package/dist/core/changeset-graph.js.map +7 -0
- package/dist/core/changeset-only-guard.js +32 -0
- package/dist/core/changeset-only-guard.js.map +7 -0
- package/dist/core/changeset-summary.js +68 -0
- package/dist/core/changeset-summary.js.map +7 -0
- package/dist/core/changeset-validator.js +66 -20
- package/dist/core/changeset-validator.js.map +2 -2
- package/dist/core/changeset-verify.js +518 -0
- package/dist/core/changeset-verify.js.map +7 -0
- package/dist/core/changeset.js +56 -9
- package/dist/core/changeset.js.map +2 -2
- package/dist/core/element-type-migration.js +145 -0
- package/dist/core/element-type-migration.js.map +7 -0
- package/dist/core/farm-manifest.js +140 -0
- package/dist/core/farm-manifest.js.map +7 -0
- package/dist/core/farm-sync-engine.js +346 -0
- package/dist/core/farm-sync-engine.js.map +7 -0
- package/dist/core/farm-sync-state.js +167 -0
- package/dist/core/farm-sync-state.js.map +7 -0
- package/dist/core/manifest.js +6 -3
- package/dist/core/manifest.js.map +2 -2
- package/dist/core/migration-registry.js +84 -1
- package/dist/core/migration-registry.js.map +2 -2
- package/dist/core/model-upgrade.js +102 -0
- package/dist/core/model-upgrade.js.map +7 -0
- package/dist/core/model.js +257 -44
- package/dist/core/model.js.map +3 -3
- package/dist/core/mutation-handler.js +71 -6
- package/dist/core/mutation-handler.js.map +2 -2
- package/dist/core/relationship-migration-table.js +6639 -0
- package/dist/core/relationship-migration-table.js.map +7 -0
- package/dist/core/relationship-migration.js +272 -0
- package/dist/core/relationship-migration.js.map +7 -0
- package/dist/core/relationship-prune.js +49 -0
- package/dist/core/relationship-prune.js.map +7 -0
- package/dist/core/relationship-staging.js +68 -0
- package/dist/core/relationship-staging.js.map +7 -0
- package/dist/core/relationships.js +26 -4
- package/dist/core/relationships.js.map +2 -2
- package/dist/core/report-data-model.js +7 -13
- package/dist/core/report-data-model.js.map +2 -2
- package/dist/core/staged-changeset-storage.js +64 -17
- package/dist/core/staged-changeset-storage.js.map +2 -2
- package/dist/core/staged-source-reference.js +28 -0
- package/dist/core/staged-source-reference.js.map +7 -0
- package/dist/core/staging-area.js +83 -18
- package/dist/core/staging-area.js.map +2 -2
- package/dist/core/virtual-projection.js +14 -5
- package/dist/core/virtual-projection.js.map +2 -2
- package/dist/export/archimate-exporter.js +1 -0
- package/dist/export/archimate-exporter.js.map +2 -2
- package/dist/generated/compiled-validators.js +2 -2
- package/dist/generated/compiled-validators.js.map +2 -2
- package/dist/generated/layer-registry.js +16 -16
- package/dist/generated/layer-registry.js.map +2 -2
- package/dist/generated/node-types.js +186 -168
- package/dist/generated/node-types.js.map +2 -2
- package/dist/generated/relationship-index.js +2209 -7727
- package/dist/generated/relationship-index.js.map +2 -2
- package/dist/integrations/claude_code/agents/dr-architect.md +16 -3
- package/dist/integrations/claude_code/agents/dr-extractor.md +1 -1
- package/dist/integrations/claude_code/commands/dr-analyzer.md +565 -0
- package/dist/integrations/claude_code/commands/dr-map.md +13 -0
- package/dist/integrations/claude_code/commands/dr-plan.md +40 -0
- package/dist/integrations/claude_code/commands/dr-relate.md +106 -96
- package/dist/integrations/claude_code/commands/dr-verify.md +45 -2
- package/dist/integrations/claude_code/docs/END_TO_END_WALKTHROUGH.md +14 -0
- package/dist/integrations/claude_code/docs/MCP_SERVER.md +79 -0
- package/dist/integrations/claude_code/docs/QUICK_START.md +37 -8
- package/dist/integrations/claude_code/docs/README.md +52 -1
- package/dist/integrations/claude_code/skills/dr_01_motivation_layer/SKILL.md +93 -72
- package/dist/integrations/claude_code/skills/dr_02_business_layer/SKILL.md +163 -126
- package/dist/integrations/claude_code/skills/dr_03_product_layer/SKILL.md +161 -126
- package/dist/integrations/claude_code/skills/dr_04_security_layer/SKILL.md +153 -133
- package/dist/integrations/claude_code/skills/dr_05_application_layer/SKILL.md +129 -100
- package/dist/integrations/claude_code/skills/dr_06_technology_layer/SKILL.md +111 -94
- package/dist/integrations/claude_code/skills/dr_07_api_layer/SKILL.md +143 -157
- package/dist/integrations/claude_code/skills/dr_08_data_model_layer/SKILL.md +117 -33
- package/dist/integrations/claude_code/skills/dr_09_dataset_layer/SKILL.md +74 -25
- package/dist/integrations/claude_code/skills/dr_10_ux_layer/SKILL.md +88 -12
- package/dist/integrations/claude_code/skills/dr_11_navigation_layer/SKILL.md +83 -24
- package/dist/integrations/claude_code/skills/dr_12_apm_layer/SKILL.md +57 -12
- package/dist/integrations/claude_code/skills/dr_13_testing_layer/SKILL.md +92 -15
- package/dist/integrations/claude_code/skills/dr_change_planning/SKILL.md +119 -0
- package/dist/integrations/claude_code/skills/dr_changeset_reviewer/SKILL.md +3 -0
- package/dist/integrations/claude_code/skills/dr_engineering_guide/SKILL.md +1 -1
- package/dist/integrations/github_copilot/agents/dr-architect.md +1 -1
- package/dist/integrations/github_copilot/skills/dr_01_motivation_layer/SKILL.md +182 -102
- package/dist/integrations/github_copilot/skills/dr_02_business_layer/SKILL.md +266 -148
- package/dist/integrations/github_copilot/skills/dr_03_product_layer/SKILL.md +547 -86
- package/dist/integrations/github_copilot/skills/dr_04_security_layer/SKILL.md +164 -169
- package/dist/integrations/github_copilot/skills/dr_05_application_layer/SKILL.md +420 -150
- package/dist/integrations/github_copilot/skills/dr_06_technology_layer/SKILL.md +331 -138
- package/dist/integrations/github_copilot/skills/dr_07_api_layer/SKILL.md +265 -201
- package/dist/integrations/github_copilot/skills/dr_08_data_model_layer/SKILL.md +181 -58
- package/dist/integrations/github_copilot/skills/dr_09_dataset_layer/SKILL.md +209 -57
- package/dist/integrations/github_copilot/skills/dr_10_ux_layer/SKILL.md +277 -112
- package/dist/integrations/github_copilot/skills/dr_11_navigation_layer/SKILL.md +219 -70
- package/dist/integrations/github_copilot/skills/dr_12_apm_layer/SKILL.md +189 -105
- package/dist/integrations/github_copilot/skills/dr_13_testing_layer/SKILL.md +222 -102
- package/dist/integrations/github_copilot/skills/dr_change_planning/SKILL.md +119 -0
- package/dist/integrations/github_copilot/skills/dr_changeset_reviewer/SKILL.md +3 -0
- package/dist/integrations/hash-utils.js.map +2 -2
- package/dist/mcp/api-key-manager.js +111 -0
- package/dist/mcp/api-key-manager.js.map +7 -0
- package/dist/mcp/changeset-only.js +34 -0
- package/dist/mcp/changeset-only.js.map +7 -0
- package/dist/mcp/http-transport.js +176 -0
- package/dist/mcp/http-transport.js.map +7 -0
- package/dist/mcp/resource-registry.js +97 -0
- package/dist/mcp/resource-registry.js.map +7 -0
- package/dist/mcp/tool-registry.js +60 -0
- package/dist/mcp/tool-registry.js.map +7 -0
- package/dist/mcp/tools/annotation-create.js +39 -0
- package/dist/mcp/tools/annotation-create.js.map +7 -0
- package/dist/mcp/tools/annotation-delete.js +29 -0
- package/dist/mcp/tools/annotation-delete.js.map +7 -0
- package/dist/mcp/tools/annotation-get.js +29 -0
- package/dist/mcp/tools/annotation-get.js.map +7 -0
- package/dist/mcp/tools/annotation-list.js +24 -0
- package/dist/mcp/tools/annotation-list.js.map +7 -0
- package/dist/mcp/tools/annotation-reply.js +34 -0
- package/dist/mcp/tools/annotation-reply.js.map +7 -0
- package/dist/mcp/tools/annotation-shared.js +10 -0
- package/dist/mcp/tools/annotation-shared.js.map +7 -0
- package/dist/mcp/tools/annotation-update.js +39 -0
- package/dist/mcp/tools/annotation-update.js.map +7 -0
- package/dist/mcp/tools/changeset-analysis-tools.js +78 -0
- package/dist/mcp/tools/changeset-analysis-tools.js.map +7 -0
- package/dist/mcp/tools/changeset-editing.js +184 -0
- package/dist/mcp/tools/changeset-editing.js.map +7 -0
- package/dist/mcp/tools/changeset-lifecycle.js +83 -0
- package/dist/mcp/tools/changeset-lifecycle.js.map +7 -0
- package/dist/mcp/tools/changeset-list.js +33 -0
- package/dist/mcp/tools/changeset-list.js.map +7 -0
- package/dist/mcp/tools/changeset-shared.js +31 -0
- package/dist/mcp/tools/changeset-shared.js.map +7 -0
- package/dist/mcp/tools/changeset-show.js +55 -0
- package/dist/mcp/tools/changeset-show.js.map +7 -0
- package/dist/mcp/tools/changeset-verify.js +43 -0
- package/dist/mcp/tools/changeset-verify.js.map +7 -0
- package/dist/mcp/tools/chat-launch.js +50 -0
- package/dist/mcp/tools/chat-launch.js.map +7 -0
- package/dist/mcp/tools/chat-status.js +26 -0
- package/dist/mcp/tools/chat-status.js.map +7 -0
- package/dist/mcp/tools/index.js +65 -0
- package/dist/mcp/tools/index.js.map +7 -0
- package/dist/mcp/tools/model-add.js +107 -0
- package/dist/mcp/tools/model-add.js.map +7 -0
- package/dist/mcp/tools/model-delete.js +99 -0
- package/dist/mcp/tools/model-delete.js.map +7 -0
- package/dist/mcp/tools/model-export.js +72 -0
- package/dist/mcp/tools/model-export.js.map +7 -0
- package/dist/mcp/tools/model-info.js +51 -0
- package/dist/mcp/tools/model-info.js.map +7 -0
- package/dist/mcp/tools/model-list.js +53 -0
- package/dist/mcp/tools/model-list.js.map +7 -0
- package/dist/mcp/tools/model-reload.js +34 -0
- package/dist/mcp/tools/model-reload.js.map +7 -0
- package/dist/mcp/tools/model-search.js +102 -0
- package/dist/mcp/tools/model-search.js.map +7 -0
- package/dist/mcp/tools/model-show.js +68 -0
- package/dist/mcp/tools/model-show.js.map +7 -0
- package/dist/mcp/tools/model-stats.js +22 -0
- package/dist/mcp/tools/model-stats.js.map +7 -0
- package/dist/mcp/tools/model-trace.js +118 -0
- package/dist/mcp/tools/model-trace.js.map +7 -0
- package/dist/mcp/tools/model-update.js +121 -0
- package/dist/mcp/tools/model-update.js.map +7 -0
- package/dist/mcp/tools/model-validate.js +78 -0
- package/dist/mcp/tools/model-validate.js.map +7 -0
- package/dist/mcp/tools/relationship-tools.js +98 -0
- package/dist/mcp/tools/relationship-tools.js.map +7 -0
- package/dist/mcp/tools/shared.js +126 -0
- package/dist/mcp/tools/shared.js.map +7 -0
- package/dist/mcp/tools/spec-type.js +90 -0
- package/dist/mcp/tools/spec-type.js.map +7 -0
- package/dist/reports/model-layer-report-generator.js +5 -3
- package/dist/reports/model-layer-report-generator.js.map +2 -2
- package/dist/reports/model-readme-generator.js +116 -0
- package/dist/reports/model-readme-generator.js.map +7 -0
- package/dist/reports/model-report-data.js +37 -1
- package/dist/reports/model-report-data.js.map +2 -2
- package/dist/reports/model-report-orchestrator.js +29 -6
- package/dist/reports/model-report-orchestrator.js.map +2 -2
- package/dist/reports/model-report-utils.js +9 -0
- package/dist/reports/model-report-utils.js.map +7 -0
- package/dist/schemas/bundled/analyzers/cbm.json +1186 -68
- package/dist/schemas/bundled/analyzers/manifest.json +2 -2
- package/dist/schemas/bundled/api.json +1029 -1658
- package/dist/schemas/bundled/apm.json +499 -734
- package/dist/schemas/bundled/application.json +745 -370
- package/dist/schemas/bundled/base.json +3 -220
- package/dist/schemas/bundled/business.json +452 -366
- package/dist/schemas/bundled/data-model.json +403 -383
- package/dist/schemas/bundled/data-store.json +334 -558
- package/dist/schemas/bundled/manifest.json +18 -18
- package/dist/schemas/bundled/motivation.json +349 -368
- package/dist/schemas/bundled/navigation.json +415 -731
- package/dist/schemas/bundled/product.json +325 -159
- package/dist/schemas/bundled/security.json +864 -1232
- package/dist/schemas/bundled/technology.json +574 -703
- package/dist/schemas/bundled/testing.json +718 -1643
- package/dist/schemas/bundled/ux.json +739 -1352
- package/dist/server/schemas.js +8 -0
- package/dist/server/schemas.js.map +2 -2
- package/dist/server/server.js +234 -31
- package/dist/server/server.js.map +2 -2
- package/dist/server-entry.js +2 -1
- package/dist/server-entry.js.map +2 -2
- package/dist/telemetry/config.js +2 -40
- package/dist/telemetry/config.js.map +2 -2
- package/dist/telemetry/index.js +1 -1
- package/dist/types/index.js.map +2 -2
- package/dist/utils/ansi-suppressor.js +23 -0
- package/dist/utils/ansi-suppressor.js.map +7 -0
- package/dist/utils/attribute-patch.js +41 -0
- package/dist/utils/attribute-patch.js.map +7 -0
- package/dist/utils/color-utils.js +34 -0
- package/dist/utils/color-utils.js.map +7 -0
- package/dist/utils/element-reference-shape.js +15 -1
- package/dist/utils/element-reference-shape.js.map +3 -3
- package/dist/utils/error-hints.js +29 -0
- package/dist/utils/error-hints.js.map +7 -0
- package/dist/utils/errors.js +75 -10
- package/dist/utils/errors.js.map +2 -2
- package/dist/utils/globals.js +17 -1
- package/dist/utils/globals.js.map +2 -2
- package/dist/utils/project-paths.js +50 -3
- package/dist/utils/project-paths.js.map +2 -2
- package/dist/utils/reference-path-parser.js +49 -0
- package/dist/utils/reference-path-parser.js.map +7 -0
- package/dist/utils/source-reference.js +17 -10
- package/dist/utils/source-reference.js.map +2 -2
- package/dist/utils/spec-version.js +10 -2
- package/dist/utils/spec-version.js.map +2 -2
- package/dist/validators/composed-reference-validator.js +240 -0
- package/dist/validators/composed-reference-validator.js.map +7 -0
- package/dist/validators/reference-validator.js +57 -13
- package/dist/validators/reference-validator.js.map +3 -3
- package/dist/validators/relationship-schema-validator.js +33 -5
- package/dist/validators/relationship-schema-validator.js.map +3 -3
- package/dist/validators/schema-validator.js +27 -9
- package/dist/validators/schema-validator.js.map +2 -2
- package/dist/validators/types.js.map +1 -1
- package/dist/viewer/README.md +6 -6
- package/dist/viewer/assets/main-CxzcuU_o.js +84 -0
- package/dist/viewer/assets/main-j-7ULYpm.css +1 -0
- package/dist/viewer/index.html +2 -2
- package/dist/viewer/manifest.json +10 -10
- package/dist/viewer/version.json +1 -1
- package/package.json +7 -3
- package/dist/viewer/assets/main-B7AOQXXX.js +0 -81
- package/dist/viewer/assets/main-vdrFrG7q.css +0 -1
|
@@ -36,14 +36,14 @@ const LAYER_TEMPLATES = [
|
|
|
36
36
|
{
|
|
37
37
|
sourcePattern: "role",
|
|
38
38
|
destinationPattern: "process",
|
|
39
|
-
predicate: "
|
|
40
|
-
description: "Roles
|
|
39
|
+
predicate: "assigned-to",
|
|
40
|
+
description: "Roles are assigned to the processes they perform"
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
|
-
sourcePattern: "
|
|
44
|
-
destinationPattern: "
|
|
43
|
+
sourcePattern: "process",
|
|
44
|
+
destinationPattern: "service",
|
|
45
45
|
predicate: "realizes",
|
|
46
|
-
description: "
|
|
46
|
+
description: "Processes realize services"
|
|
47
47
|
}
|
|
48
48
|
]
|
|
49
49
|
},
|
|
@@ -53,15 +53,15 @@ const LAYER_TEMPLATES = [
|
|
|
53
53
|
patterns: [
|
|
54
54
|
{
|
|
55
55
|
sourcePattern: "feature",
|
|
56
|
-
destinationPattern: "
|
|
56
|
+
destinationPattern: "softwarecapability",
|
|
57
57
|
predicate: "realizes",
|
|
58
|
-
description: "Features realize capabilities"
|
|
58
|
+
description: "Features realize software capabilities"
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
|
-
sourcePattern: "
|
|
61
|
+
sourcePattern: "softwarecapability",
|
|
62
62
|
destinationPattern: "milestone",
|
|
63
63
|
predicate: "scheduled-for",
|
|
64
|
-
description: "
|
|
64
|
+
description: "Software capabilities are scheduled for milestones"
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
sourcePattern: "feature",
|
|
@@ -96,8 +96,8 @@ const LAYER_TEMPLATES = [
|
|
|
96
96
|
{
|
|
97
97
|
sourcePattern: "role",
|
|
98
98
|
destinationPattern: "permission",
|
|
99
|
-
predicate: "
|
|
100
|
-
description: "Roles
|
|
99
|
+
predicate: "aggregates",
|
|
100
|
+
description: "Roles aggregate the permissions they grant"
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
sourcePattern: "policy",
|
|
@@ -148,10 +148,10 @@ const LAYER_TEMPLATES = [
|
|
|
148
148
|
description: "Artifacts realize components"
|
|
149
149
|
},
|
|
150
150
|
{
|
|
151
|
-
sourcePattern: "
|
|
152
|
-
destinationPattern: "
|
|
153
|
-
predicate: "
|
|
154
|
-
description: "
|
|
151
|
+
sourcePattern: "node",
|
|
152
|
+
destinationPattern: "systemsoftware",
|
|
153
|
+
predicate: "composes",
|
|
154
|
+
description: "Nodes compose the system software they run"
|
|
155
155
|
}
|
|
156
156
|
]
|
|
157
157
|
},
|
|
@@ -160,46 +160,46 @@ const LAYER_TEMPLATES = [
|
|
|
160
160
|
standard: "OpenAPI 3.0",
|
|
161
161
|
patterns: [
|
|
162
162
|
{
|
|
163
|
-
sourcePattern: "
|
|
164
|
-
destinationPattern: "
|
|
165
|
-
predicate: "
|
|
166
|
-
description: "
|
|
163
|
+
sourcePattern: "pathitem",
|
|
164
|
+
destinationPattern: "operation",
|
|
165
|
+
predicate: "composes",
|
|
166
|
+
description: "Path items compose their operations"
|
|
167
167
|
},
|
|
168
168
|
{
|
|
169
|
-
sourcePattern: "
|
|
170
|
-
destinationPattern: "
|
|
171
|
-
predicate: "
|
|
172
|
-
description: "
|
|
169
|
+
sourcePattern: "operation",
|
|
170
|
+
destinationPattern: "responses",
|
|
171
|
+
predicate: "composes",
|
|
172
|
+
description: "Operations compose their responses map"
|
|
173
173
|
},
|
|
174
174
|
{
|
|
175
|
-
sourcePattern: "
|
|
175
|
+
sourcePattern: "mediatype",
|
|
176
176
|
destinationPattern: "schema",
|
|
177
|
-
predicate: "
|
|
178
|
-
description: "
|
|
177
|
+
predicate: "references",
|
|
178
|
+
description: "Media types reference their schema by $ref"
|
|
179
179
|
}
|
|
180
180
|
]
|
|
181
181
|
},
|
|
182
182
|
{
|
|
183
183
|
layer: "ux",
|
|
184
|
-
standard: "
|
|
184
|
+
standard: "HTML 5.3 / component libraries",
|
|
185
185
|
patterns: [
|
|
186
186
|
{
|
|
187
|
-
sourcePattern: "
|
|
188
|
-
destinationPattern: "
|
|
189
|
-
predicate: "
|
|
190
|
-
description: "
|
|
187
|
+
sourcePattern: "view",
|
|
188
|
+
destinationPattern: "componentinstance",
|
|
189
|
+
predicate: "composes",
|
|
190
|
+
description: "Views compose the component instances placed in them"
|
|
191
191
|
},
|
|
192
192
|
{
|
|
193
|
-
sourcePattern: "
|
|
194
|
-
destinationPattern: "
|
|
195
|
-
predicate: "
|
|
196
|
-
description: "
|
|
193
|
+
sourcePattern: "componentinstance",
|
|
194
|
+
destinationPattern: "librarycomponent",
|
|
195
|
+
predicate: "realizes",
|
|
196
|
+
description: "Instances realize the library component they place"
|
|
197
197
|
},
|
|
198
198
|
{
|
|
199
|
-
sourcePattern: "
|
|
200
|
-
destinationPattern: "
|
|
201
|
-
predicate: "
|
|
202
|
-
description: "
|
|
199
|
+
sourcePattern: "view",
|
|
200
|
+
destinationPattern: "dataconfig",
|
|
201
|
+
predicate: "binds-to",
|
|
202
|
+
description: "Views bind to their data configuration"
|
|
203
203
|
}
|
|
204
204
|
]
|
|
205
205
|
},
|
|
@@ -301,25 +301,25 @@ const LAYER_TEMPLATES = [
|
|
|
301
301
|
},
|
|
302
302
|
{
|
|
303
303
|
layer: "testing",
|
|
304
|
-
standard: "
|
|
304
|
+
standard: "IEEE 829-2008 test documentation",
|
|
305
305
|
patterns: [
|
|
306
306
|
{
|
|
307
|
-
sourcePattern: "
|
|
308
|
-
destinationPattern: "
|
|
309
|
-
predicate: "
|
|
310
|
-
description: "Test
|
|
307
|
+
sourcePattern: "testcasesketch",
|
|
308
|
+
destinationPattern: "coveragerequirement",
|
|
309
|
+
predicate: "validates",
|
|
310
|
+
description: "Test case sketches validate the coverage requirement they exercise"
|
|
311
311
|
},
|
|
312
312
|
{
|
|
313
|
-
sourcePattern: "
|
|
314
|
-
destinationPattern: "
|
|
315
|
-
predicate: "
|
|
316
|
-
description: "
|
|
313
|
+
sourcePattern: "testcoveragetarget",
|
|
314
|
+
destinationPattern: "coveragerequirement",
|
|
315
|
+
predicate: "composes",
|
|
316
|
+
description: "Coverage targets compose their coverage requirements"
|
|
317
317
|
},
|
|
318
318
|
{
|
|
319
|
-
sourcePattern: "
|
|
320
|
-
destinationPattern: "
|
|
321
|
-
predicate: "
|
|
322
|
-
description: "
|
|
319
|
+
sourcePattern: "testcoveragemodel",
|
|
320
|
+
destinationPattern: "testcoveragetarget",
|
|
321
|
+
predicate: "composes",
|
|
322
|
+
description: "Coverage models compose their coverage targets"
|
|
323
323
|
}
|
|
324
324
|
]
|
|
325
325
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/audit/relationships/analysis/layer-templates.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Layer-specific relationship templates for gap analysis and standard alignment\n */\n\nexport interface LayerTemplate {\n layer: string;\n standard: string;\n patterns: Array<{\n sourcePattern: string;\n destinationPattern: string;\n predicate: string;\n description: string;\n }>;\n}\n\nexport const LAYER_TEMPLATES: LayerTemplate[] = [\n {\n layer: \"motivation\",\n standard: \"ArchiMate 3.2\",\n patterns: [\n {\n sourcePattern: \"goal\",\n destinationPattern: \"principle\",\n predicate: \"supports\",\n description: \"Goals support principles\",\n },\n {\n sourcePattern: \"requirement\",\n destinationPattern: \"goal\",\n predicate: \"realizes\",\n description: \"Requirements realize goals\",\n },\n {\n sourcePattern: \"constraint\",\n destinationPattern: \"requirement\",\n predicate: \"restricts\",\n description: \"Constraints restrict requirements\",\n },\n ],\n },\n {\n layer: \"business\",\n standard: \"ArchiMate 3.2\",\n patterns: [\n {\n sourcePattern: \"process\",\n destinationPattern: \"process\",\n predicate: \"triggers\",\n description: \"Processes trigger other processes\",\n },\n {\n sourcePattern: \"role\",\n destinationPattern: \"process\",\n predicate: \"
|
|
4
|
+
"sourcesContent": ["/**\n * Layer-specific relationship templates for gap analysis and standard alignment\n */\n\nexport interface LayerTemplate {\n layer: string;\n standard: string;\n patterns: Array<{\n sourcePattern: string;\n destinationPattern: string;\n predicate: string;\n description: string;\n }>;\n}\n\nexport const LAYER_TEMPLATES: LayerTemplate[] = [\n {\n layer: \"motivation\",\n standard: \"ArchiMate 3.2\",\n patterns: [\n {\n sourcePattern: \"goal\",\n destinationPattern: \"principle\",\n predicate: \"supports\",\n description: \"Goals support principles\",\n },\n {\n sourcePattern: \"requirement\",\n destinationPattern: \"goal\",\n predicate: \"realizes\",\n description: \"Requirements realize goals\",\n },\n {\n sourcePattern: \"constraint\",\n destinationPattern: \"requirement\",\n predicate: \"restricts\",\n description: \"Constraints restrict requirements\",\n },\n ],\n },\n {\n layer: \"business\",\n standard: \"ArchiMate 3.2\",\n patterns: [\n {\n sourcePattern: \"process\",\n destinationPattern: \"process\",\n predicate: \"triggers\",\n description: \"Processes trigger other processes\",\n },\n {\n sourcePattern: \"role\",\n destinationPattern: \"process\",\n predicate: \"assigned-to\",\n description: \"Roles are assigned to the processes they perform\",\n },\n {\n sourcePattern: \"process\",\n destinationPattern: \"service\",\n predicate: \"realizes\",\n description: \"Processes realize services\",\n },\n ],\n },\n {\n layer: \"product\",\n standard: \"Product Management Practice\",\n patterns: [\n {\n sourcePattern: \"feature\",\n destinationPattern: \"softwarecapability\",\n predicate: \"realizes\",\n description: \"Features realize software capabilities\",\n },\n {\n sourcePattern: \"softwarecapability\",\n destinationPattern: \"milestone\",\n predicate: \"scheduled-for\",\n description: \"Software capabilities are scheduled for milestones\",\n },\n {\n sourcePattern: \"feature\",\n destinationPattern: \"milestone\",\n predicate: \"scheduled-for\",\n description: \"Features are scheduled for milestones\",\n },\n {\n sourcePattern: \"feature\",\n destinationPattern: \"feature\",\n predicate: \"depends-on\",\n description: \"Features depend on other features\",\n },\n {\n sourcePattern: \"userworkflow\",\n destinationPattern: \"feature\",\n predicate: \"composes\",\n description: \"User workflows compose features\",\n },\n ],\n },\n {\n layer: \"security\",\n standard: \"NIST SP 800-53\",\n patterns: [\n {\n sourcePattern: \"countermeasure\",\n destinationPattern: \"threat\",\n predicate: \"mitigates\",\n description: \"Countermeasures mitigate threats\",\n },\n {\n sourcePattern: \"role\",\n destinationPattern: \"permission\",\n predicate: \"aggregates\",\n description: \"Roles aggregate the permissions they grant\",\n },\n {\n sourcePattern: \"policy\",\n destinationPattern: \"countermeasure\",\n predicate: \"mandates\",\n description: \"Policies mandate countermeasures\",\n },\n ],\n },\n {\n layer: \"application\",\n standard: \"ArchiMate 3.2\",\n patterns: [\n {\n sourcePattern: \"component\",\n destinationPattern: \"service\",\n predicate: \"realizes\",\n description: \"Components realize services\",\n },\n {\n sourcePattern: \"component\",\n destinationPattern: \"component\",\n predicate: \"uses\",\n description: \"Components use other components\",\n },\n {\n sourcePattern: \"interface\",\n destinationPattern: \"service\",\n predicate: \"serves\",\n description: \"Interfaces serve services\",\n },\n ],\n },\n {\n layer: \"technology\",\n standard: \"ArchiMate 3.2\",\n patterns: [\n {\n sourcePattern: \"node\",\n destinationPattern: \"device\",\n predicate: \"composes\",\n description: \"Nodes compose devices\",\n },\n {\n sourcePattern: \"artifact\",\n destinationPattern: \"component\",\n predicate: \"realizes\",\n description: \"Artifacts realize components\",\n },\n {\n sourcePattern: \"node\",\n destinationPattern: \"systemsoftware\",\n predicate: \"composes\",\n description: \"Nodes compose the system software they run\",\n },\n ],\n },\n {\n layer: \"api\",\n standard: \"OpenAPI 3.0\",\n patterns: [\n {\n sourcePattern: \"pathitem\",\n destinationPattern: \"operation\",\n predicate: \"composes\",\n description: \"Path items compose their operations\",\n },\n {\n sourcePattern: \"operation\",\n destinationPattern: \"responses\",\n predicate: \"composes\",\n description: \"Operations compose their responses map\",\n },\n {\n sourcePattern: \"mediatype\",\n destinationPattern: \"schema\",\n predicate: \"references\",\n description: \"Media types reference their schema by $ref\",\n },\n ],\n },\n {\n layer: \"ux\",\n standard: \"HTML 5.3 / component libraries\",\n patterns: [\n {\n sourcePattern: \"view\",\n destinationPattern: \"componentinstance\",\n predicate: \"composes\",\n description: \"Views compose the component instances placed in them\",\n },\n {\n sourcePattern: \"componentinstance\",\n destinationPattern: \"librarycomponent\",\n predicate: \"realizes\",\n description: \"Instances realize the library component they place\",\n },\n {\n sourcePattern: \"view\",\n destinationPattern: \"dataconfig\",\n predicate: \"binds-to\",\n description: \"Views bind to their data configuration\",\n },\n ],\n },\n {\n layer: \"navigation\",\n standard: \"Router patterns\",\n patterns: [\n {\n sourcePattern: \"route\",\n destinationPattern: \"screen\",\n predicate: \"navigates-to\",\n description: \"Routes navigate to screens\",\n },\n {\n sourcePattern: \"menuitem\",\n destinationPattern: \"route\",\n predicate: \"references\",\n description: \"Menu items reference routes\",\n },\n {\n sourcePattern: \"link\",\n destinationPattern: \"route\",\n predicate: \"targets\",\n description: \"Links target routes\",\n },\n ],\n },\n {\n layer: \"data-model\",\n standard: \"JSON Schema Draft 7\",\n patterns: [\n {\n sourcePattern: \"entity\",\n destinationPattern: \"entity\",\n predicate: \"references\",\n description: \"Entities reference other entities\",\n },\n {\n sourcePattern: \"entity\",\n destinationPattern: \"property\",\n predicate: \"has\",\n description: \"Entities have properties\",\n },\n {\n sourcePattern: \"property\",\n destinationPattern: \"entity\",\n predicate: \"references\",\n description: \"Properties reference entities\",\n },\n ],\n },\n {\n layer: \"data-store\",\n standard: \"Database schema patterns\",\n patterns: [\n {\n sourcePattern: \"table\",\n destinationPattern: \"table\",\n predicate: \"references\",\n description: \"Tables reference other tables via foreign keys\",\n },\n {\n sourcePattern: \"index\",\n destinationPattern: \"table\",\n predicate: \"indexes\",\n description: \"Indexes apply to tables\",\n },\n {\n sourcePattern: \"view\",\n destinationPattern: \"table\",\n predicate: \"derives-from\",\n description: \"Views derive from tables\",\n },\n ],\n },\n {\n layer: \"apm\",\n standard: \"OpenTelemetry\",\n patterns: [\n {\n sourcePattern: \"trace\",\n destinationPattern: \"service\",\n predicate: \"monitors\",\n description: \"Traces monitor services\",\n },\n {\n sourcePattern: \"metric\",\n destinationPattern: \"component\",\n predicate: \"measures\",\n description: \"Metrics measure components\",\n },\n {\n sourcePattern: \"alert\",\n destinationPattern: \"metric\",\n predicate: \"triggers-on\",\n description: \"Alerts trigger on metrics\",\n },\n ],\n },\n {\n layer: \"testing\",\n standard: \"IEEE 829-2008 test documentation\",\n patterns: [\n {\n sourcePattern: \"testcasesketch\",\n destinationPattern: \"coveragerequirement\",\n predicate: \"validates\",\n description: \"Test case sketches validate the coverage requirement they exercise\",\n },\n {\n sourcePattern: \"testcoveragetarget\",\n destinationPattern: \"coveragerequirement\",\n predicate: \"composes\",\n description: \"Coverage targets compose their coverage requirements\",\n },\n {\n sourcePattern: \"testcoveragemodel\",\n destinationPattern: \"testcoveragetarget\",\n predicate: \"composes\",\n description: \"Coverage models compose their coverage targets\",\n },\n ],\n },\n];\n"],
|
|
5
5
|
"mappings": "AAeO,MAAM,kBAAmC;EAC9C;IACE,OAAO;IACP,UAAU;IACV,UAAU;MACR;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;;;EAInB;IACE,OAAO;IACP,UAAU;IACV,UAAU;MACR;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;;;EAInB;IACE,OAAO;IACP,UAAU;IACV,UAAU;MACR;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;;;EAInB;IACE,OAAO;IACP,UAAU;IACV,UAAU;MACR;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;;;EAInB;IACE,OAAO;IACP,UAAU;IACV,UAAU;MACR;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;;;EAInB;IACE,OAAO;IACP,UAAU;IACV,UAAU;MACR;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;;;EAInB;IACE,OAAO;IACP,UAAU;IACV,UAAU;MACR;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;;;EAInB;IACE,OAAO;IACP,UAAU;IACV,UAAU;MACR;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;;;EAInB;IACE,OAAO;IACP,UAAU;IACV,UAAU;MACR;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;;;EAInB;IACE,OAAO;IACP,UAAU;IACV,UAAU;MACR;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;;;EAInB;IACE,OAAO;IACP,UAAU;IACV,UAAU;MACR;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;;;EAInB;IACE,OAAO;IACP,UAAU;IACV,UAAU;MACR;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;;;EAInB;IACE,OAAO;IACP,UAAU;IACV,UAAU;MACR;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;MAEf;QACE,eAAe;QACf,oBAAoB;QACpB,WAAW;QACX,aAAa;;;;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command, CommanderError } from "commander";
|
|
3
3
|
import { setGlobalOptions } from "./utils/globals.js";
|
|
4
|
+
import { installAnsiSuppressor } from "./utils/ansi-suppressor.js";
|
|
4
5
|
import { initCommand } from "./commands/init.js";
|
|
5
6
|
import { addCommand } from "./commands/add.js";
|
|
6
7
|
import { updateCommand } from "./commands/update.js";
|
|
@@ -22,6 +23,7 @@ import { chatCommand } from "./commands/chat.js";
|
|
|
22
23
|
import { upgradeCommand } from "./commands/upgrade.js";
|
|
23
24
|
import { conformanceCommand } from "./commands/conformance.js";
|
|
24
25
|
import { changesetCommands } from "./commands/changeset.js";
|
|
26
|
+
import { farmCommands } from "./commands/farm.js";
|
|
25
27
|
import { claudeCommands } from "./commands/claude.js";
|
|
26
28
|
import { copilotCommands } from "./commands/copilot.js";
|
|
27
29
|
import { analyzerCommands } from "./commands/analyzer.js";
|
|
@@ -35,11 +37,13 @@ import { auditSnapshotsCommand } from "./commands/audit-snapshots.js";
|
|
|
35
37
|
import { repairAttributeCollisionCommand } from "./commands/repair.js";
|
|
36
38
|
import { initTelemetry, startActiveSpan, shutdownTelemetry } from "./telemetry/index.js";
|
|
37
39
|
import { installConsoleInterceptor } from "./telemetry/console-interceptor.js";
|
|
38
|
-
import { getErrorMessage } from "./utils/errors.js";
|
|
40
|
+
import { getErrorMessage, CLIError } from "./utils/errors.js";
|
|
41
|
+
import { getCliVersion } from "./utils/spec-version.js";
|
|
39
42
|
const isTelemetryEnabled = !1, CONSOLE_LOGGING_COMMANDS = /* @__PURE__ */ new Set(["chat", "validate", "import", "export"]);
|
|
43
|
+
process.stdout.isTTY || (process.env.FORCE_COLOR = "0", process.env.NO_COLOR = "1"), installAnsiSuppressor();
|
|
40
44
|
async function extractExitCode(error) {
|
|
41
|
-
const { CLIError } = await import("./utils/errors.js");
|
|
42
|
-
if (error instanceof
|
|
45
|
+
const { CLIError: CLIError2 } = await import("./utils/errors.js");
|
|
46
|
+
if (error instanceof CLIError2 || error instanceof CommanderError)
|
|
43
47
|
return error.exitCode;
|
|
44
48
|
if (error && typeof error == "object" && "exitCode" in error) {
|
|
45
49
|
const errorObj = error;
|
|
@@ -48,26 +52,28 @@ async function extractExitCode(error) {
|
|
|
48
52
|
}
|
|
49
53
|
return 1;
|
|
50
54
|
}
|
|
51
|
-
const cliVersion =
|
|
52
|
-
(process.argv.includes("--version") || process.argv.includes("-V")) && (process.argv = ["node", "dr", "version"]), program.name("dr").description("Documentation Robotics CLI - Architecture Model Management").option("-v, --verbose", "Enable verbose output").option("--debug", "Enable debug mode").exitOverride().showSuggestionAfterError().hook("preAction", async (thisCommand) => {
|
|
55
|
+
const cliVersion = getCliVersion(), program = new Command();
|
|
56
|
+
(process.argv.includes("--version") || process.argv.includes("-V")) && (process.argv = ["node", "dr", "version"]), program.name("dr").description("Documentation Robotics CLI - Architecture Model Management").option("-v, --verbose", "Enable verbose output").option("--debug", "Enable debug mode").option("--json", "Output as JSON (supported on mutating and query commands)").option("--codebase-path <path>", "Override codebase root path (default: resolved from manifest or project root)").exitOverride().showSuggestionAfterError().hook("preAction", async (thisCommand) => {
|
|
53
57
|
const options = thisCommand.opts();
|
|
54
58
|
setGlobalOptions({
|
|
55
59
|
verbose: options.verbose,
|
|
56
|
-
debug: options.debug
|
|
60
|
+
debug: options.debug,
|
|
61
|
+
json: options.json,
|
|
62
|
+
codebasePath: options.codebasePath
|
|
57
63
|
});
|
|
58
64
|
}), program.command("init [name]").description("Initialize a new architecture model").option("--name <name>", "Model name (overrides positional argument)").option("--author <author>", "Model author").option("--description <desc>", "Model description").addHelpText("after", `
|
|
59
65
|
Examples:
|
|
60
66
|
$ dr init
|
|
61
67
|
$ dr init claudetoreum
|
|
62
68
|
$ dr init "Enterprise Architecture" --author "Team A"
|
|
63
|
-
$ dr init --name "My Project" --description "13-layer federated model"`).action((name, options) => initCommand({ ...options, name: options.name || name })), program.command("add <layer> <type> <name>").description("Add an element to a layer").option("--name <name>", "Element display name (defaults to the name argument)").option("--description <desc>", "Element description").option("--attributes <json>", "Element type-specific attributes as JSON object").option("--source-file <path>", "Source file path (relative from repository root)").option("--source-symbol <name>", "Symbol name (class, function, variable) in source file").option("--source-provenance <type>", "Provenance type: extracted, manual, inferred, generated").option("--source-repo-remote <url>", "Git remote URL for repository context").option("--source-repo-commit <sha>", "Git commit SHA (40 hex characters) for repository context").addHelpText("after", `
|
|
69
|
+
$ dr init --name "My Project" --description "13-layer federated model"`).action((name, options) => initCommand({ ...options, name: options.name || name })), program.command("add <layer> <type> <name>").description("Add an element to a layer").option("--model <path>", "Path to model root (contains model/manifest.yaml)").option("--name <name>", "Element display name (defaults to the name argument)").option("--description <desc>", "Element description").option("--attributes <json>", "Element type-specific attributes as JSON object").option("--source-file <path>", "Source file path (relative from repository root)").option("--source-symbol <name>", "Symbol name (class, function, variable) in source file").option("--source-provenance <type>", "Provenance type: extracted, manual, inferred, generated").option("--source-repo-remote <url>", "Git remote URL for repository context").option("--source-repo-commit <sha>", "Git commit SHA (40 hex characters) for repository context").option("--verbose", "Show detailed output (can also use global -v flag)").addHelpText("after", `
|
|
64
70
|
Examples:
|
|
65
71
|
$ dr add business service "Customer Management"
|
|
66
72
|
$ dr add api operation "Create Customer" --attributes '{"operationId":"createCustomer","summary":"Create a customer","tags":"customers"}'
|
|
67
73
|
$ dr add application component "Customer API" --description "REST API for customer operations"
|
|
68
74
|
$ dr add security policy "Auth Validator" --source-file "src/auth/validator.ts" --source-symbol "validateToken" --source-provenance "extracted"
|
|
69
75
|
|
|
70
|
-
Note: Element IDs are generated automatically in format {layer}.{type}.{kebab-name}`).action(addCommand), program.command("update <id>").description("Update an element").option("--name <name>", "New element name").option("--description <desc>", "New description").option("--type <new-type>", "Change element type (must be valid for the element's layer; incompatible attributes must be cleaned up manually)").option("--attributes <json>", "Updated type-specific attributes (JSON)").option("--source-file <path>", "Source file path (relative from repository root)").option("--source-symbol <name>", "Symbol name (class, function, variable) in source file").option("--source-provenance <type>", "Provenance type: extracted, manual, inferred, generated").option("--source-repo-remote <url>", "Git remote URL for repository context").option("--source-repo-commit <sha>", "Git commit SHA (40 hex characters) for repository context").option("--clear-source-reference", "Remove source reference from element").addHelpText("after", `
|
|
76
|
+
Note: Element IDs are generated automatically in format {layer}.{type}.{kebab-name}`).action((layer, type, name, options) => addCommand(layer, type, name, { ...options, verbose: options.verbose ?? program.opts().verbose })), program.command("update <id>").description("Update an element").option("--model <path>", "Path to model root (contains model/manifest.yaml)").option("--name <name>", "New element name").option("--description <desc>", "New description").option("--type <new-type>", "Change element type (must be valid for the element's layer; incompatible attributes must be cleaned up manually)").option("--attributes <json>", "Updated type-specific attributes (JSON)").option("--attribute-patch <json>", "Merge these attributes into the current ones (JSON object; null removes a key). Cannot be combined with --attributes").option("--source-file <path>", "Source file path (relative from repository root)").option("--source-symbol <name>", "Symbol name (class, function, variable) in source file").option("--source-provenance <type>", "Provenance type: extracted, manual, inferred, generated").option("--source-repo-remote <url>", "Git remote URL for repository context").option("--source-repo-commit <sha>", "Git commit SHA (40 hex characters) for repository context").option("--clear-source-reference", "Remove source reference from element").option("--verbose", "Show detailed output (can also use global -v flag)").addHelpText("after", `
|
|
71
77
|
Note: Changes are written immediately to model files.
|
|
72
78
|
To track changes for review, activate a changeset first:
|
|
73
79
|
$ dr changeset activate my-changeset
|
|
@@ -76,13 +82,14 @@ Examples:
|
|
|
76
82
|
$ dr update api-endpoint-create-customer --name "Create Customer (v2)"
|
|
77
83
|
$ dr update business-service-order --description "Updated description"
|
|
78
84
|
$ dr update application-applicationfunction-process-orders --type applicationservice
|
|
79
|
-
$ dr update
|
|
85
|
+
$ dr update api.operation.create-customer --attribute-patch '{"summary":"Create a customer (v2)"}'
|
|
86
|
+
$ dr update security-policy-auth --source-file "src/auth/policy.ts" --source-provenance "extracted"`).action((id, options) => updateCommand(id, { ...options, verbose: options.verbose ?? program.opts().verbose })), program.command("delete <id>").description("Delete an element").option("--model <path>", "Path to model root (contains model/manifest.yaml)").option("--force", "Skip dependency checks (confirmation is also skipped in non-TTY environments)").option("--cascade", "Remove dependent elements automatically").option("--dry-run", "Show what would be removed without actually removing").option("--verbose", "Show detailed output (can also use global -v flag)").addHelpText("after", `
|
|
80
87
|
Examples:
|
|
81
88
|
$ dr delete api-endpoint-old-endpoint
|
|
82
89
|
$ dr delete api-endpoint-old-endpoint --force
|
|
83
90
|
$ dr delete api-endpoint-old-endpoint --cascade
|
|
84
91
|
$ dr delete api-endpoint-old-endpoint --dry-run
|
|
85
|
-
$ dr delete api-endpoint-old-endpoint --cascade --dry-run`).action(deleteCommand), program.command("show <id>").description("Display element details").option("--model <path>", "Path to model root (contains model/manifest.yaml)").addHelpText("after", `
|
|
92
|
+
$ dr delete api-endpoint-old-endpoint --cascade --dry-run`).action((id, options) => deleteCommand(id, { ...options, verbose: options.verbose ?? program.opts().verbose })), program.command("show <id>").description("Display element details").option("--model <path>", "Path to model root (contains model/manifest.yaml)").addHelpText("after", `
|
|
86
93
|
Examples:
|
|
87
94
|
$ dr show api-endpoint-create-customer
|
|
88
95
|
$ dr show business-service-order-mgmt`).action((id, options) => showCommand(id, options)), program.command("list [layer]").description("List elements in a layer (or all layers if omitted)").option("--type <type>", "Filter by element type").option("--json", "Output as JSON").option("--model <path>", "Path to model root (contains model/manifest.yaml)").addHelpText("after", `
|
|
@@ -91,12 +98,12 @@ Examples:
|
|
|
91
98
|
$ dr list api
|
|
92
99
|
$ dr list business --type businessservice
|
|
93
100
|
$ dr list api --json
|
|
94
|
-
$ dr list --json`).action(listCommand), program.command("search <query>").description("Search for elements by name or ID").option("--layer <layer>", "Limit search to specific layer").option("--type <type>", "Filter by element type").option("--source-file <path>", "Find elements referencing a source file (takes precedence over pattern matching)").option("--json", "Output as JSON").addHelpText("after", `
|
|
101
|
+
$ dr list --json`).action((layer, options) => listCommand(layer, { ...options, json: options.json ?? program.opts().json })), program.command("search <query>").description("Search for elements by name or ID").option("--layer <layer>", "Limit search to specific layer").option("--type <type>", "Filter by element type").option("--source-file <path>", "Find elements referencing a source file (takes precedence over pattern matching)").option("--json", "Output as JSON").addHelpText("after", `
|
|
95
102
|
Examples:
|
|
96
103
|
$ dr search customer
|
|
97
104
|
$ dr search "order processing" --layer business
|
|
98
105
|
$ dr search create-* --type endpoint
|
|
99
|
-
$ dr search "" --source-file src/api/customer.ts`).action(searchCommand), program.command("validate").description("Validate the architecture model").option("--layers <layers...>", "Specific layers to validate").option("--strict", "Treat warnings as errors").option("--verbose", "Show detailed validation output with relationship breakdown").option("--quiet", "Show minimal output").option("--output <path>", "Export validation report to file (JSON or Markdown)").option("--model <path>", "Path to model root (contains model/manifest.yaml)").option("--orphans", "Show only orphaned elements grouped by layer with relationship suggestions").option("--all", "Run all validations (default behavior)").option("--markdown", "Validate markdown structure").option("--schemas", "Validate JSON schemas").option("--schema", "Validate JSON schemas (alias for --schemas)").option("--relationships", "Validate relationships").option("--structure", "Validate documentation structure").option("--naming", "Validate naming conventions").option("--references", "Validate cross-layer references").addHelpText("after", `
|
|
106
|
+
$ dr search "" --source-file src/api/customer.ts`).action((query, options) => searchCommand(query, { ...options, json: options.json ?? program.opts().json })), program.command("validate").description("Validate the architecture model").option("--layers <layers...>", "Specific layers to validate").option("--strict", "Treat warnings as errors").option("--verbose", "Show detailed validation output with relationship breakdown").option("--quiet", "Show minimal output").option("--output <path>", "Export validation report to file (JSON or Markdown)").option("--model <path>", "Path to model root (contains model/manifest.yaml)").option("--orphans", "Show only orphaned elements grouped by layer with relationship suggestions").option("--all", "Run all validations (default behavior)").option("--markdown", "Validate markdown structure").option("--schemas", "Validate JSON schemas").option("--schema", "Validate JSON schemas (alias for --schemas)").option("--relationships", "Validate relationships").option("--structure", "Validate documentation structure").option("--naming", "Validate naming conventions").option("--references", "Validate cross-layer references").option("--scope <scope>", "Validation scope: 'local' (default) or 'composed' for cross-model validation").option("--model-path <mapping...>", "Override filesystem path for external model (format: model-name=/path/to/project-root, can be repeated)").addHelpText("after", `
|
|
100
107
|
Examples:
|
|
101
108
|
$ dr validate
|
|
102
109
|
$ dr validate --all --strict
|
|
@@ -108,7 +115,11 @@ Examples:
|
|
|
108
115
|
$ dr validate --relationships
|
|
109
116
|
$ dr validate --layers business api
|
|
110
117
|
$ dr validate --orphans
|
|
111
|
-
$ dr validate --orphans --output orphans.json
|
|
118
|
+
$ dr validate --orphans --output orphans.json
|
|
119
|
+
$ dr validate --scope composed --model-path auth-service=/path/to/auth-service-repo
|
|
120
|
+
$ dr validate --scope composed --model-path auth-service=/path/to/auth-service-repo --model-path payment-service=/path/to/payment-repo
|
|
121
|
+
|
|
122
|
+
Note: When using --model-path, pass the project root (where documentation-robotics/model/ is located).`).action(validateCommand), program.command("export <format>").description("Export the architecture model to various formats").option("--output <path>", "Output file path (default: print to stdout)").option("--layers <layers...>", "Specific layers to export").option("--model <path>", "Path to model root directory or manifest.yaml file").option("--include-sources", "Include source file paths in PlantUML diagrams as notes").addHelpText("after", `
|
|
112
123
|
Supported formats:
|
|
113
124
|
archimate Export to ArchiMate XML (layers 1, 2, 5, 6)
|
|
114
125
|
openapi Export to OpenAPI 3.0 specification (layer 7)
|
|
@@ -233,9 +244,9 @@ Examples:
|
|
|
233
244
|
$ dr repair:attribute-collision --apply # Restore every recoverable value
|
|
234
245
|
$ dr repair:attribute-collision --format json --output report.json`).action((options) => repairAttributeCollisionCommand(options));
|
|
235
246
|
const relationshipGroup = program.command("relationship").description("Relationship operations");
|
|
236
|
-
relationshipCommands(relationshipGroup);
|
|
247
|
+
relationshipCommands(relationshipGroup, program);
|
|
237
248
|
const elementGroup = program.command("element").description("Element operations");
|
|
238
|
-
elementCommands(elementGroup), schemaCommands(program), catalogCommands(program), docsCommands(program), program.command("trace <elementId>").description("Trace dependencies for an element").option("--direction <dir>", "Trace direction: up (dependencies), down (dependents), both (default)").option("--depth <num>", "Maximum traversal depth").option("--metrics", "Show graph and element metrics").option("--model <path>", "Path to model root (contains model/manifest.yaml)").addHelpText("after", `
|
|
249
|
+
elementCommands(elementGroup, program), schemaCommands(program), catalogCommands(program), docsCommands(program), program.command("trace <elementId>").description("Trace dependencies for an element").option("--direction <dir>", "Trace direction: up (dependencies), down (dependents), both (default)").option("--depth <num>", "Maximum traversal depth").option("--metrics", "Show graph and element metrics").option("--model <path>", "Path to model root (contains model/manifest.yaml)").addHelpText("after", `
|
|
239
250
|
Examples:
|
|
240
251
|
$ dr trace api-endpoint-create-customer
|
|
241
252
|
$ dr trace business-service-order --direction down --metrics
|
|
@@ -246,7 +257,7 @@ Examples:
|
|
|
246
257
|
showMetrics: options.metrics,
|
|
247
258
|
model: options.model
|
|
248
259
|
});
|
|
249
|
-
}), program.command("visualize").description("Launch visualization server with WebSocket support").option("--port <num>", "Server port (default: 8080)").option("--no-browser", "Do not auto-open browser").option("--no-auth", "Disable authentication (enabled by default)").option("--token <token>", "Custom auth token (auto-generated by default)").option("--with-danger", "Enable dangerous mode for chat (skip permissions)").option("--viewer-path <path>", "Path to custom viewer build (e.g., ./dist/embedded/dr-viewer-bundle)").addHelpText("after", `
|
|
260
|
+
}), program.command("visualize").description("Launch visualization server with WebSocket support").option("--port <num>", "Server port (default: 8080)").option("--no-browser", "Do not auto-open browser").option("--no-auth", "Disable authentication (enabled by default)").option("--token <token>", "Custom auth token (auto-generated by default)").option("--with-danger", "Enable dangerous mode for chat (skip permissions)").option("--with-changesets", "Let chat stage model changes in a changeset (no commit, apply or delete)").option("--viewer-path <path>", "Path to custom viewer build (e.g., ./dist/embedded/dr-viewer-bundle)").addHelpText("after", `
|
|
250
261
|
Examples:
|
|
251
262
|
$ dr visualize
|
|
252
263
|
$ dr visualize --port 3000
|
|
@@ -254,11 +265,25 @@ Examples:
|
|
|
254
265
|
$ dr visualize --no-auth
|
|
255
266
|
$ dr visualize --token my-secret-token
|
|
256
267
|
$ dr visualize --with-danger
|
|
268
|
+
$ dr visualize --with-changesets
|
|
257
269
|
$ dr visualize --viewer-path ./dist/embedded/dr-viewer-bundle
|
|
258
270
|
|
|
259
|
-
|
|
260
|
-
-
|
|
261
|
-
-
|
|
271
|
+
Default mode (read-safe permissions) enables:
|
|
272
|
+
- Running 'dr' CLI commands to query the architecture model
|
|
273
|
+
- Reading the codebase
|
|
274
|
+
- Reading the documentation-robotics/ model folder
|
|
275
|
+
- Reading the .dr/ configuration folder
|
|
276
|
+
|
|
277
|
+
Changeset mode (--with-changesets, Claude Code) adds to the read-safe mode:
|
|
278
|
+
- Creating, activating and inspecting changesets
|
|
279
|
+
- Staging new elements, element updates and new relationships (dr add,
|
|
280
|
+
dr update, dr relationship add) in the active changeset
|
|
281
|
+
- Never committing, applying, reverting or deleting: those stay with you.
|
|
282
|
+
Writes outside an active changeset are refused.
|
|
283
|
+
|
|
284
|
+
Dangerous mode (--with-danger) enables unrestricted access:
|
|
285
|
+
- Claude Code: --dangerously-skip-permissions (full tool access)
|
|
286
|
+
- GitHub Copilot: --allow-all-tools (full tool access)
|
|
262
287
|
|
|
263
288
|
The --viewer-path option allows loading a local build of the web UI:
|
|
264
289
|
- Point to a directory containing index.html and supporting files
|
|
@@ -272,8 +297,61 @@ The --viewer-path option allows loading a local build of the web UI:
|
|
|
272
297
|
// Commander sets 'auth' to false when --no-auth is used
|
|
273
298
|
token: options.token,
|
|
274
299
|
withDanger: options.withDanger,
|
|
300
|
+
withChangesets: options.withChangesets,
|
|
275
301
|
viewerPath: options.viewerPath
|
|
276
302
|
});
|
|
303
|
+
}), program.command("mcp").description("Start MCP server for AI assistant integration").option("--regenerate-key", "Generate a new MCP API key, overwrite it at the configured storage path, and print it (does not start the server)").option("--transport <type>", "Transport type: stdio or http (default: stdio)", "stdio").option("--port <number>", "Port for HTTP transport (default: 3100, only meaningful with --transport http)", "3100").option("--host <address>", "Host address for HTTP transport (default: 127.0.0.1, only meaningful with --transport http)", "127.0.0.1").addHelpText("after", `
|
|
304
|
+
Examples:
|
|
305
|
+
|
|
306
|
+
Stdio transport (default):
|
|
307
|
+
$ dr mcp
|
|
308
|
+
|
|
309
|
+
HTTP transport:
|
|
310
|
+
$ dr mcp --transport http # HTTP on localhost:3100
|
|
311
|
+
$ dr mcp --transport http --port 8200 # HTTP on custom port
|
|
312
|
+
$ dr mcp --transport http --host 0.0.0.0 --port 3100 # Listen on all interfaces
|
|
313
|
+
|
|
314
|
+
Key management:
|
|
315
|
+
$ dr mcp --regenerate-key # Generate new API key
|
|
316
|
+
|
|
317
|
+
Initial Setup:
|
|
318
|
+
On first launch, generates an API key and asks where to store it (interactive
|
|
319
|
+
sessions only; non-interactive launches default to ~/.dr-mcp-key). The key is
|
|
320
|
+
printed to stderr on every launch and must be supplied via environment variable.
|
|
321
|
+
|
|
322
|
+
Stdio Configuration:
|
|
323
|
+
For stdio transport, supply the key via environment variable:
|
|
324
|
+
|
|
325
|
+
{
|
|
326
|
+
"command": "dr",
|
|
327
|
+
"args": ["mcp"],
|
|
328
|
+
"env": { "DR_MCP_API_KEY": "<your-api-key>" }
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
HTTP Configuration:
|
|
332
|
+
For HTTP transport, include the API key as a Bearer token in the Authorization header:
|
|
333
|
+
|
|
334
|
+
{
|
|
335
|
+
"url": "http://localhost:3100/mcp",
|
|
336
|
+
"headers": {
|
|
337
|
+
"Authorization": "Bearer <your-api-key>"
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
Use --regenerate-key to rotate the key (e.g. after a suspected leak) without
|
|
342
|
+
manually deleting the stored key file or config.`).action(async (options) => {
|
|
343
|
+
const { mcpCommand } = await import("./commands/mcp.js"), transport = options.transport.toLowerCase();
|
|
344
|
+
if (transport !== "stdio" && transport !== "http")
|
|
345
|
+
throw new CLIError(`Invalid transport: ${transport}. Allowed values: stdio, http`, 1);
|
|
346
|
+
const port = parseInt(options.port, 10);
|
|
347
|
+
if (!Number.isFinite(port) || port < 1 || port > 65535)
|
|
348
|
+
throw new CLIError(`Invalid port: ${options.port}. Must be a number between 1 and 65535`, 1);
|
|
349
|
+
await mcpCommand({
|
|
350
|
+
regenerateKey: options.regenerateKey,
|
|
351
|
+
transport,
|
|
352
|
+
port,
|
|
353
|
+
host: options.host
|
|
354
|
+
});
|
|
277
355
|
}), program.command("chat [client] [withDanger]").description("Interactive chat with AI about the architecture model").addHelpText("after", `
|
|
278
356
|
Arguments:
|
|
279
357
|
client Optional AI client to use: "claude-code" or "github-copilot"
|
|
@@ -287,9 +365,15 @@ Examples:
|
|
|
287
365
|
$ dr chat claude-code with-danger # Use Claude Code with dangerous mode
|
|
288
366
|
$ dr chat github-copilot with-danger # Use GitHub Copilot with dangerous mode
|
|
289
367
|
|
|
290
|
-
|
|
291
|
-
-
|
|
292
|
-
-
|
|
368
|
+
Default mode (read-safe permissions) enables:
|
|
369
|
+
- Running 'dr' CLI commands to query the architecture model
|
|
370
|
+
- Reading the codebase
|
|
371
|
+
- Reading the documentation-robotics/ model folder
|
|
372
|
+
- Reading the .dr/ configuration folder
|
|
373
|
+
|
|
374
|
+
Dangerous mode (--with-danger) enables unrestricted access:
|
|
375
|
+
- Claude Code: --dangerously-skip-permissions (full tool access)
|
|
376
|
+
- GitHub Copilot: --allow-all-tools (full tool access)
|
|
293
377
|
|
|
294
378
|
This launches an interactive chat interface where you can ask AI questions
|
|
295
379
|
about your architecture model. Supports Claude Code CLI and GitHub Copilot CLI.
|
|
@@ -322,10 +406,10 @@ Examples:
|
|
|
322
406
|
$ dr conformance --verbose`).action(async (options) => {
|
|
323
407
|
await conformanceCommand({
|
|
324
408
|
layers: options.layers,
|
|
325
|
-
json: options.json,
|
|
409
|
+
json: options.json ?? program.opts().json,
|
|
326
410
|
verbose: options.verbose ?? program.opts().verbose
|
|
327
411
|
});
|
|
328
|
-
}), changesetCommands(program), claudeCommands(program), copilotCommands(program), analyzerCommands(program), (async () => {
|
|
412
|
+
}), changesetCommands(program), farmCommands(program), claudeCommands(program), copilotCommands(program), analyzerCommands(program), (async () => {
|
|
329
413
|
let exitCode = 0;
|
|
330
414
|
try {
|
|
331
415
|
if (isTelemetryEnabled) {
|
|
@@ -346,8 +430,8 @@ Examples:
|
|
|
346
430
|
// SpanStatusCode.ERROR
|
|
347
431
|
message: getErrorMessage(error)
|
|
348
432
|
}));
|
|
349
|
-
const { CLIError } = await import("./utils/errors.js");
|
|
350
|
-
error instanceof CommanderError || (error instanceof
|
|
433
|
+
const { CLIError: CLIError2 } = await import("./utils/errors.js"), { isJson } = await import("./utils/globals.js");
|
|
434
|
+
error instanceof CommanderError || (error instanceof CLIError2 ? isJson() || console.error(error.format()) : error instanceof Error ? console.error(error.message) : console.error(String(error))), exitCode = await extractExitCode(error);
|
|
351
435
|
}
|
|
352
436
|
}, {
|
|
353
437
|
"cli.command": commandName,
|
|
@@ -359,8 +443,8 @@ Examples:
|
|
|
359
443
|
try {
|
|
360
444
|
await program.parseAsync(process.argv);
|
|
361
445
|
} catch (error) {
|
|
362
|
-
const { CLIError } = await import("./utils/errors.js");
|
|
363
|
-
error instanceof CommanderError || (error instanceof
|
|
446
|
+
const { CLIError: CLIError2 } = await import("./utils/errors.js"), { isJson } = await import("./utils/globals.js");
|
|
447
|
+
error instanceof CommanderError || (error instanceof CLIError2 ? isJson() || console.error(error.format()) : error instanceof Error ? console.error(error.message) : console.error(String(error)));
|
|
364
448
|
const exitCodeFromError = await extractExitCode(error);
|
|
365
449
|
process.exit(exitCodeFromError);
|
|
366
450
|
}
|