@mycodemap/mycodemap 1.9.0 → 2.7.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/CHANGELOG.md +38 -0
- package/README.md +63 -978
- package/README.zh-CN.md +1096 -0
- package/dist/cli/commands/agent-metrics/human.d.ts +4 -0
- package/dist/cli/commands/agent-metrics/human.d.ts.map +1 -0
- package/dist/cli/commands/agent-metrics/human.js +134 -0
- package/dist/cli/commands/agent-metrics/human.js.map +1 -0
- package/dist/cli/commands/agent-metrics/index.d.ts +15 -0
- package/dist/cli/commands/agent-metrics/index.d.ts.map +1 -0
- package/dist/cli/commands/agent-metrics/index.js +116 -0
- package/dist/cli/commands/agent-metrics/index.js.map +1 -0
- package/dist/cli/commands/analyze-options.d.ts.map +1 -1
- package/dist/cli/commands/analyze-options.js +8 -0
- package/dist/cli/commands/analyze-options.js.map +1 -1
- package/dist/cli/commands/analyze.d.ts +3 -196
- package/dist/cli/commands/analyze.d.ts.map +1 -1
- package/dist/cli/commands/analyze.js +27 -1162
- package/dist/cli/commands/analyze.js.map +1 -1
- package/dist/cli/commands/benchmark.d.ts +8 -0
- package/dist/cli/commands/benchmark.d.ts.map +1 -0
- package/dist/cli/commands/benchmark.js +153 -0
- package/dist/cli/commands/benchmark.js.map +1 -0
- package/dist/cli/commands/complexity.d.ts.map +1 -1
- package/dist/cli/commands/complexity.js +62 -95
- package/dist/cli/commands/complexity.js.map +1 -1
- package/dist/cli/commands/deps.d.ts +3 -59
- package/dist/cli/commands/deps.d.ts.map +1 -1
- package/dist/cli/commands/deps.js +25 -331
- package/dist/cli/commands/deps.js.map +1 -1
- package/dist/cli/commands/doctor.d.ts +3 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/doctor.js +34 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/env-contract.d.ts +3 -0
- package/dist/cli/commands/env-contract.d.ts.map +1 -0
- package/dist/cli/commands/env-contract.js +221 -0
- package/dist/cli/commands/env-contract.js.map +1 -0
- package/dist/cli/commands/generate.d.ts +19 -1
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +735 -89
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/impact.d.ts +4 -38
- package/dist/cli/commands/impact.d.ts.map +1 -1
- package/dist/cli/commands/impact.js +133 -375
- package/dist/cli/commands/impact.js.map +1 -1
- package/dist/cli/commands/init.d.ts +1 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +61 -2
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/preview.d.ts +3 -0
- package/dist/cli/commands/preview.d.ts.map +1 -0
- package/dist/cli/commands/preview.js +216 -0
- package/dist/cli/commands/preview.js.map +1 -0
- package/dist/cli/commands/query.d.ts +2 -20
- package/dist/cli/commands/query.d.ts.map +1 -1
- package/dist/cli/commands/query.js +23 -708
- package/dist/cli/commands/query.js.map +1 -1
- package/dist/cli/commands/watch-foreground.d.ts.map +1 -1
- package/dist/cli/commands/watch-foreground.js +5 -1
- package/dist/cli/commands/watch-foreground.js.map +1 -1
- package/dist/cli/config-loader.d.ts.map +1 -1
- package/dist/cli/config-loader.js +51 -13
- package/dist/cli/config-loader.js.map +1 -1
- package/dist/cli/doctor/check-agent.d.ts +3 -0
- package/dist/cli/doctor/check-agent.d.ts.map +1 -0
- package/dist/cli/doctor/check-agent.js +60 -0
- package/dist/cli/doctor/check-agent.js.map +1 -0
- package/dist/cli/doctor/check-env-contract.d.ts +3 -0
- package/dist/cli/doctor/check-env-contract.d.ts.map +1 -0
- package/dist/cli/doctor/check-env-contract.js +96 -0
- package/dist/cli/doctor/check-env-contract.js.map +1 -0
- package/dist/cli/doctor/check-ghost-commands.d.ts +3 -0
- package/dist/cli/doctor/check-ghost-commands.d.ts.map +1 -0
- package/dist/cli/doctor/check-ghost-commands.js +86 -0
- package/dist/cli/doctor/check-ghost-commands.js.map +1 -0
- package/dist/cli/doctor/check-native-deps.d.ts +3 -0
- package/dist/cli/doctor/check-native-deps.d.ts.map +1 -0
- package/dist/cli/doctor/check-native-deps.js +70 -0
- package/dist/cli/doctor/check-native-deps.js.map +1 -0
- package/dist/cli/doctor/check-workspace-drift.d.ts +3 -0
- package/dist/cli/doctor/check-workspace-drift.d.ts.map +1 -0
- package/dist/cli/doctor/check-workspace-drift.js +83 -0
- package/dist/cli/doctor/check-workspace-drift.js.map +1 -0
- package/dist/cli/doctor/formatter.d.ts +20 -0
- package/dist/cli/doctor/formatter.d.ts.map +1 -0
- package/dist/cli/doctor/formatter.js +91 -0
- package/dist/cli/doctor/formatter.js.map +1 -0
- package/dist/cli/doctor/index.d.ts +8 -0
- package/dist/cli/doctor/index.d.ts.map +1 -0
- package/dist/cli/doctor/index.js +9 -0
- package/dist/cli/doctor/index.js.map +1 -0
- package/dist/cli/doctor/orchestrator.d.ts +3 -0
- package/dist/cli/doctor/orchestrator.d.ts.map +1 -0
- package/dist/cli/doctor/orchestrator.js +40 -0
- package/dist/cli/doctor/orchestrator.js.map +1 -0
- package/dist/cli/doctor/types.d.ts +19 -0
- package/dist/cli/doctor/types.d.ts.map +1 -0
- package/dist/cli/doctor/types.js +4 -0
- package/dist/cli/doctor/types.js.map +1 -0
- package/dist/cli/env-contract/check.d.ts +18 -0
- package/dist/cli/env-contract/check.d.ts.map +1 -0
- package/dist/cli/env-contract/check.js +118 -0
- package/dist/cli/env-contract/check.js.map +1 -0
- package/dist/cli/env-contract/discovery.d.ts +12 -0
- package/dist/cli/env-contract/discovery.d.ts.map +1 -0
- package/dist/cli/env-contract/discovery.js +249 -0
- package/dist/cli/env-contract/discovery.js.map +1 -0
- package/dist/cli/env-contract/filters.d.ts +10 -0
- package/dist/cli/env-contract/filters.d.ts.map +1 -0
- package/dist/cli/env-contract/filters.js +23 -0
- package/dist/cli/env-contract/filters.js.map +1 -0
- package/dist/cli/env-contract/index.d.ts +6 -0
- package/dist/cli/env-contract/index.d.ts.map +1 -0
- package/dist/cli/env-contract/index.js +8 -0
- package/dist/cli/env-contract/index.js.map +1 -0
- package/dist/cli/env-contract/reminder-engine.d.ts +34 -0
- package/dist/cli/env-contract/reminder-engine.d.ts.map +1 -0
- package/dist/cli/env-contract/reminder-engine.js +51 -0
- package/dist/cli/env-contract/reminder-engine.js.map +1 -0
- package/dist/cli/env-contract/reminder-hook-runner.d.ts +45 -0
- package/dist/cli/env-contract/reminder-hook-runner.d.ts.map +1 -0
- package/dist/cli/env-contract/reminder-hook-runner.js +273 -0
- package/dist/cli/env-contract/reminder-hook-runner.js.map +1 -0
- package/dist/cli/env-contract/reminder-ledger.d.ts +11 -0
- package/dist/cli/env-contract/reminder-ledger.d.ts.map +1 -0
- package/dist/cli/env-contract/reminder-ledger.js +37 -0
- package/dist/cli/env-contract/reminder-ledger.js.map +1 -0
- package/dist/cli/env-contract/types.d.ts +48 -0
- package/dist/cli/env-contract/types.d.ts.map +1 -0
- package/dist/cli/env-contract/types.js +22 -0
- package/dist/cli/env-contract/types.js.map +1 -0
- package/dist/cli/env-contract/validation.d.ts +10 -0
- package/dist/cli/env-contract/validation.d.ts.map +1 -0
- package/dist/cli/env-contract/validation.js +116 -0
- package/dist/cli/env-contract/validation.js.map +1 -0
- package/dist/cli/first-run-guide.d.ts.map +1 -1
- package/dist/cli/first-run-guide.js +8 -3
- package/dist/cli/first-run-guide.js.map +1 -1
- package/dist/cli/index.js +94 -22
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init/assistant-plan.d.ts +14 -0
- package/dist/cli/init/assistant-plan.d.ts.map +1 -0
- package/dist/cli/init/assistant-plan.js +208 -0
- package/dist/cli/init/assistant-plan.js.map +1 -0
- package/dist/cli/init/detect.d.ts +28 -0
- package/dist/cli/init/detect.d.ts.map +1 -0
- package/dist/cli/init/detect.js +63 -0
- package/dist/cli/init/detect.js.map +1 -0
- package/dist/cli/init/env-contract-plan.d.ts +28 -0
- package/dist/cli/init/env-contract-plan.d.ts.map +1 -0
- package/dist/cli/init/env-contract-plan.js +184 -0
- package/dist/cli/init/env-contract-plan.js.map +1 -0
- package/dist/cli/init/manifest-extractors.d.ts +22 -0
- package/dist/cli/init/manifest-extractors.d.ts.map +1 -0
- package/dist/cli/init/manifest-extractors.js +185 -0
- package/dist/cli/init/manifest-extractors.js.map +1 -0
- package/dist/cli/init/profile-loader.d.ts +49 -0
- package/dist/cli/init/profile-loader.d.ts.map +1 -0
- package/dist/cli/init/profile-loader.js +107 -0
- package/dist/cli/init/profile-loader.js.map +1 -0
- package/dist/cli/init/profile-plan.d.ts +38 -0
- package/dist/cli/init/profile-plan.d.ts.map +1 -0
- package/dist/cli/init/profile-plan.js +120 -0
- package/dist/cli/init/profile-plan.js.map +1 -0
- package/dist/cli/init/profiles/generic.json +16 -0
- package/dist/cli/init/profiles/go.json +12 -0
- package/dist/cli/init/profiles/nodejs.json +16 -0
- package/dist/cli/init/profiles/python.json +17 -0
- package/dist/cli/init/profiles/rust.json +12 -0
- package/dist/cli/init/receipt.d.ts.map +1 -1
- package/dist/cli/init/receipt.js +107 -7
- package/dist/cli/init/receipt.js.map +1 -1
- package/dist/cli/init/reconciler.d.ts +10 -1
- package/dist/cli/init/reconciler.d.ts.map +1 -1
- package/dist/cli/init/reconciler.js +85 -15
- package/dist/cli/init/reconciler.js.map +1 -1
- package/dist/cli/interface-contract/commands/agent-metrics.d.ts +3 -0
- package/dist/cli/interface-contract/commands/agent-metrics.d.ts.map +1 -0
- package/dist/cli/interface-contract/commands/agent-metrics.js +217 -0
- package/dist/cli/interface-contract/commands/agent-metrics.js.map +1 -0
- package/dist/cli/interface-contract/commands/analyze.d.ts +3 -0
- package/dist/cli/interface-contract/commands/analyze.d.ts.map +1 -0
- package/dist/cli/interface-contract/commands/analyze.js +139 -0
- package/dist/cli/interface-contract/commands/analyze.js.map +1 -0
- package/dist/cli/interface-contract/commands/benchmark.d.ts +3 -0
- package/dist/cli/interface-contract/commands/benchmark.d.ts.map +1 -0
- package/dist/cli/interface-contract/commands/benchmark.js +108 -0
- package/dist/cli/interface-contract/commands/benchmark.js.map +1 -0
- package/dist/cli/interface-contract/commands/deps.d.ts +3 -0
- package/dist/cli/interface-contract/commands/deps.d.ts.map +1 -0
- package/dist/cli/interface-contract/commands/deps.js +130 -0
- package/dist/cli/interface-contract/commands/deps.js.map +1 -0
- package/dist/cli/interface-contract/commands/doctor.d.ts +3 -0
- package/dist/cli/interface-contract/commands/doctor.d.ts.map +1 -0
- package/dist/cli/interface-contract/commands/doctor.js +60 -0
- package/dist/cli/interface-contract/commands/doctor.js.map +1 -0
- package/dist/cli/interface-contract/commands/env-contract.d.ts +3 -0
- package/dist/cli/interface-contract/commands/env-contract.d.ts.map +1 -0
- package/dist/cli/interface-contract/commands/env-contract.js +168 -0
- package/dist/cli/interface-contract/commands/env-contract.js.map +1 -0
- package/dist/cli/interface-contract/commands/index.d.ts +12 -0
- package/dist/cli/interface-contract/commands/index.d.ts.map +1 -0
- package/dist/cli/interface-contract/commands/index.js +24 -0
- package/dist/cli/interface-contract/commands/index.js.map +1 -0
- package/dist/cli/interface-contract/commands/init.d.ts +3 -0
- package/dist/cli/interface-contract/commands/init.d.ts.map +1 -0
- package/dist/cli/interface-contract/commands/init.js +96 -0
- package/dist/cli/interface-contract/commands/init.js.map +1 -0
- package/dist/cli/interface-contract/commands/preview.d.ts +3 -0
- package/dist/cli/interface-contract/commands/preview.d.ts.map +1 -0
- package/dist/cli/interface-contract/commands/preview.js +118 -0
- package/dist/cli/interface-contract/commands/preview.js.map +1 -0
- package/dist/cli/interface-contract/commands/query.d.ts +3 -0
- package/dist/cli/interface-contract/commands/query.d.ts.map +1 -0
- package/dist/cli/interface-contract/commands/query.js +186 -0
- package/dist/cli/interface-contract/commands/query.js.map +1 -0
- package/dist/cli/interface-contract/index.d.ts +22 -0
- package/dist/cli/interface-contract/index.d.ts.map +1 -0
- package/dist/cli/interface-contract/index.js +41 -0
- package/dist/cli/interface-contract/index.js.map +1 -0
- package/dist/cli/interface-contract/schema.d.ts +30 -0
- package/dist/cli/interface-contract/schema.d.ts.map +1 -0
- package/dist/cli/interface-contract/schema.js +73 -0
- package/dist/cli/interface-contract/schema.js.map +1 -0
- package/dist/cli/interface-contract/types.d.ts +77 -0
- package/dist/cli/interface-contract/types.d.ts.map +1 -0
- package/dist/cli/interface-contract/types.js +4 -0
- package/dist/cli/interface-contract/types.js.map +1 -0
- package/dist/cli/output/apply-suggestion.d.ts +12 -0
- package/dist/cli/output/apply-suggestion.d.ts.map +1 -0
- package/dist/cli/output/apply-suggestion.js +29 -0
- package/dist/cli/output/apply-suggestion.js.map +1 -0
- package/dist/cli/output/error-codes.d.ts +24 -0
- package/dist/cli/output/error-codes.d.ts.map +1 -0
- package/dist/cli/output/error-codes.js +94 -0
- package/dist/cli/output/error-codes.js.map +1 -0
- package/dist/cli/output/errors.d.ts +14 -0
- package/dist/cli/output/errors.d.ts.map +1 -0
- package/dist/cli/output/errors.js +182 -0
- package/dist/cli/output/errors.js.map +1 -0
- package/dist/cli/output/index.d.ts +13 -0
- package/dist/cli/output/index.d.ts.map +1 -0
- package/dist/cli/output/index.js +11 -0
- package/dist/cli/output/index.js.map +1 -0
- package/dist/cli/output/mode.d.ts +12 -0
- package/dist/cli/output/mode.d.ts.map +1 -0
- package/dist/cli/output/mode.js +23 -0
- package/dist/cli/output/mode.js.map +1 -0
- package/dist/cli/output/progress.d.ts +9 -0
- package/dist/cli/output/progress.d.ts.map +1 -0
- package/dist/cli/output/progress.js +65 -0
- package/dist/cli/output/progress.js.map +1 -0
- package/dist/cli/output/render.d.ts +11 -0
- package/dist/cli/output/render.d.ts.map +1 -0
- package/dist/cli/output/render.js +18 -0
- package/dist/cli/output/render.js.map +1 -0
- package/dist/cli/output/types.d.ts +53 -0
- package/dist/cli/output/types.d.ts.map +1 -0
- package/dist/cli/output/types.js +14 -0
- package/dist/cli/output/types.js.map +1 -0
- package/dist/cli/output/wasm-fallback.d.ts +14 -0
- package/dist/cli/output/wasm-fallback.d.ts.map +1 -0
- package/dist/cli/output/wasm-fallback.js +92 -0
- package/dist/cli/output/wasm-fallback.js.map +1 -0
- package/dist/cli/preview/complexity-scanner.d.ts +21 -0
- package/dist/cli/preview/complexity-scanner.d.ts.map +1 -0
- package/dist/cli/preview/complexity-scanner.js +52 -0
- package/dist/cli/preview/complexity-scanner.js.map +1 -0
- package/dist/cli/preview/dependency-extractor.d.ts +38 -0
- package/dist/cli/preview/dependency-extractor.d.ts.map +1 -0
- package/dist/cli/preview/dependency-extractor.js +140 -0
- package/dist/cli/preview/dependency-extractor.js.map +1 -0
- package/dist/cli/preview/preview-renderer.d.ts +32 -0
- package/dist/cli/preview/preview-renderer.d.ts.map +1 -0
- package/dist/cli/preview/preview-renderer.js +54 -0
- package/dist/cli/preview/preview-renderer.js.map +1 -0
- package/dist/cli/storage-runtime.d.ts +7 -0
- package/dist/cli/storage-runtime.d.ts.map +1 -1
- package/dist/cli/storage-runtime.js +22 -0
- package/dist/cli/storage-runtime.js.map +1 -1
- package/dist/cli/tree-sitter-check.d.ts +6 -1
- package/dist/cli/tree-sitter-check.d.ts.map +1 -1
- package/dist/cli/tree-sitter-check.js +23 -1
- package/dist/cli/tree-sitter-check.js.map +1 -1
- package/dist/cli-new/index.js +1 -1
- package/dist/cli-new/index.js.map +1 -1
- package/dist/composition/parser-composition.d.ts +7 -0
- package/dist/composition/parser-composition.d.ts.map +1 -0
- package/dist/composition/parser-composition.js +15 -0
- package/dist/composition/parser-composition.js.map +1 -0
- package/dist/core/analyzer.d.ts.map +1 -1
- package/dist/core/analyzer.js +83 -67
- package/dist/core/analyzer.js.map +1 -1
- package/dist/core/ast-complexity-analyzer.d.ts +12 -6
- package/dist/core/ast-complexity-analyzer.d.ts.map +1 -1
- package/dist/core/ast-complexity-analyzer.js +368 -209
- package/dist/core/ast-complexity-analyzer.js.map +1 -1
- package/dist/core/file-discovery.d.ts +1 -1
- package/dist/core/file-discovery.d.ts.map +1 -1
- package/dist/core/file-discovery.js +3 -0
- package/dist/core/file-discovery.js.map +1 -1
- package/dist/core/global-index.d.ts +3 -1
- package/dist/core/global-index.d.ts.map +1 -1
- package/dist/core/global-index.js +69 -4
- package/dist/core/global-index.js.map +1 -1
- package/dist/domain/entities/CodeGraph.d.ts +3 -0
- package/dist/domain/entities/CodeGraph.d.ts.map +1 -1
- package/dist/domain/entities/CodeGraph.js +19 -2
- package/dist/domain/entities/CodeGraph.js.map +1 -1
- package/dist/domain/entities/Dependency.d.ts +5 -2
- package/dist/domain/entities/Dependency.d.ts.map +1 -1
- package/dist/domain/entities/Dependency.js +49 -3
- package/dist/domain/entities/Dependency.js.map +1 -1
- package/dist/domain/repositories/CodeGraphRepository.d.ts +5 -0
- package/dist/domain/repositories/CodeGraphRepository.d.ts.map +1 -1
- package/dist/domain/repositories/CodeGraphRepository.js.map +1 -1
- package/dist/execution/contract-tools/analyze.d.ts +205 -0
- package/dist/execution/contract-tools/analyze.d.ts.map +1 -0
- package/dist/execution/contract-tools/analyze.js +1215 -0
- package/dist/execution/contract-tools/analyze.js.map +1 -0
- package/dist/execution/contract-tools/deps.d.ts +62 -0
- package/dist/execution/contract-tools/deps.d.ts.map +1 -0
- package/dist/execution/contract-tools/deps.js +234 -0
- package/dist/execution/contract-tools/deps.js.map +1 -0
- package/dist/execution/contract-tools/index.d.ts +5 -0
- package/dist/execution/contract-tools/index.d.ts.map +1 -0
- package/dist/execution/contract-tools/index.js +7 -0
- package/dist/execution/contract-tools/index.js.map +1 -0
- package/dist/execution/contract-tools/query.d.ts +60 -0
- package/dist/execution/contract-tools/query.d.ts.map +1 -0
- package/dist/execution/contract-tools/query.js +532 -0
- package/dist/execution/contract-tools/query.js.map +1 -0
- package/dist/execution/contract-tools/types.d.ts +26 -0
- package/dist/execution/contract-tools/types.d.ts.map +1 -0
- package/dist/execution/contract-tools/types.js +32 -0
- package/dist/execution/contract-tools/types.js.map +1 -0
- package/dist/generator/index.d.ts.map +1 -1
- package/dist/generator/index.js +0 -3
- package/dist/generator/index.js.map +1 -1
- package/dist/infrastructure/parser/enhancers/TypeScriptTypeEnhancer.d.ts +12 -0
- package/dist/infrastructure/parser/enhancers/TypeScriptTypeEnhancer.d.ts.map +1 -0
- package/dist/infrastructure/parser/enhancers/TypeScriptTypeEnhancer.js +55 -0
- package/dist/infrastructure/parser/enhancers/TypeScriptTypeEnhancer.js.map +1 -0
- package/dist/infrastructure/parser/implementations/GoParser.d.ts +2 -1
- package/dist/infrastructure/parser/implementations/GoParser.d.ts.map +1 -1
- package/dist/infrastructure/parser/implementations/GoParser.js +13 -1
- package/dist/infrastructure/parser/implementations/GoParser.js.map +1 -1
- package/dist/infrastructure/parser/implementations/PythonTreeSitterParser.d.ts +114 -0
- package/dist/infrastructure/parser/implementations/PythonTreeSitterParser.d.ts.map +1 -0
- package/dist/infrastructure/parser/implementations/PythonTreeSitterParser.js +1022 -0
- package/dist/infrastructure/parser/implementations/PythonTreeSitterParser.js.map +1 -0
- package/dist/infrastructure/parser/implementations/TreeSitterParser.d.ts +78 -0
- package/dist/infrastructure/parser/implementations/TreeSitterParser.d.ts.map +1 -0
- package/dist/infrastructure/parser/implementations/TreeSitterParser.js +648 -0
- package/dist/infrastructure/parser/implementations/TreeSitterParser.js.map +1 -0
- package/dist/infrastructure/parser/implementations/TypeScriptParser.d.ts +3 -55
- package/dist/infrastructure/parser/implementations/TypeScriptParser.d.ts.map +1 -1
- package/dist/infrastructure/parser/implementations/TypeScriptParser.js +4 -411
- package/dist/infrastructure/parser/implementations/TypeScriptParser.js.map +1 -1
- package/dist/infrastructure/parser/index.d.ts +2 -0
- package/dist/infrastructure/parser/index.d.ts.map +1 -1
- package/dist/infrastructure/parser/index.js +9 -6
- package/dist/infrastructure/parser/index.js.map +1 -1
- package/dist/infrastructure/parser/interfaces/ParserBase.d.ts.map +1 -1
- package/dist/infrastructure/parser/interfaces/ParserBase.js +1 -0
- package/dist/infrastructure/parser/interfaces/ParserBase.js.map +1 -1
- package/dist/infrastructure/repositories/CodeGraphRepositoryImpl.d.ts +2 -0
- package/dist/infrastructure/repositories/CodeGraphRepositoryImpl.d.ts.map +1 -1
- package/dist/infrastructure/repositories/CodeGraphRepositoryImpl.js +4 -0
- package/dist/infrastructure/repositories/CodeGraphRepositoryImpl.js.map +1 -1
- package/dist/infrastructure/storage/StorageFactory.d.ts +5 -18
- package/dist/infrastructure/storage/StorageFactory.d.ts.map +1 -1
- package/dist/infrastructure/storage/StorageFactory.js +30 -98
- package/dist/infrastructure/storage/StorageFactory.js.map +1 -1
- package/dist/infrastructure/storage/adapters/SQLiteStorage.d.ts +13 -1
- package/dist/infrastructure/storage/adapters/SQLiteStorage.d.ts.map +1 -1
- package/dist/infrastructure/storage/adapters/SQLiteStorage.js +322 -76
- package/dist/infrastructure/storage/adapters/SQLiteStorage.js.map +1 -1
- package/dist/infrastructure/storage/adapters/sqlite-loader.d.ts +45 -0
- package/dist/infrastructure/storage/adapters/sqlite-loader.d.ts.map +1 -0
- package/dist/infrastructure/storage/adapters/sqlite-loader.js +266 -0
- package/dist/infrastructure/storage/adapters/sqlite-loader.js.map +1 -0
- package/dist/infrastructure/storage/community-helpers.d.ts +4 -0
- package/dist/infrastructure/storage/community-helpers.d.ts.map +1 -0
- package/dist/infrastructure/storage/community-helpers.js +392 -0
- package/dist/infrastructure/storage/community-helpers.js.map +1 -0
- package/dist/infrastructure/storage/graph-helpers.d.ts +22 -5
- package/dist/infrastructure/storage/graph-helpers.d.ts.map +1 -1
- package/dist/infrastructure/storage/graph-helpers.js +496 -91
- package/dist/infrastructure/storage/graph-helpers.js.map +1 -1
- package/dist/infrastructure/storage/index.d.ts +1 -1
- package/dist/infrastructure/storage/index.d.ts.map +1 -1
- package/dist/infrastructure/storage/index.js +1 -1
- package/dist/infrastructure/storage/index.js.map +1 -1
- package/dist/infrastructure/storage/interfaces/StorageBase.d.ts +2 -2
- package/dist/infrastructure/storage/interfaces/StorageBase.d.ts.map +1 -1
- package/dist/infrastructure/storage/interfaces/StorageBase.js.map +1 -1
- package/dist/infrastructure/storage/sqlite/GovernanceGraphCache.d.ts +2 -0
- package/dist/infrastructure/storage/sqlite/GovernanceGraphCache.d.ts.map +1 -1
- package/dist/infrastructure/storage/sqlite/GovernanceGraphCache.js +52 -12
- package/dist/infrastructure/storage/sqlite/GovernanceGraphCache.js.map +1 -1
- package/dist/infrastructure/storage/sqlite/schema.d.ts +2 -2
- package/dist/infrastructure/storage/sqlite/schema.d.ts.map +1 -1
- package/dist/infrastructure/storage/sqlite/schema.js +49 -1
- package/dist/infrastructure/storage/sqlite/schema.js.map +1 -1
- package/dist/interface/config/index.d.ts +5 -3
- package/dist/interface/config/index.d.ts.map +1 -1
- package/dist/interface/types/index.d.ts +37 -6
- package/dist/interface/types/index.d.ts.map +1 -1
- package/dist/interface/types/parser.d.ts +85 -0
- package/dist/interface/types/parser.d.ts.map +1 -1
- package/dist/interface/types/storage.d.ts +227 -10
- package/dist/interface/types/storage.d.ts.map +1 -1
- package/dist/orchestrator/agent-metrics-service.d.ts +126 -0
- package/dist/orchestrator/agent-metrics-service.d.ts.map +1 -0
- package/dist/orchestrator/agent-metrics-service.js +444 -0
- package/dist/orchestrator/agent-metrics-service.js.map +1 -0
- package/dist/orchestrator/types.d.ts +2 -0
- package/dist/orchestrator/types.d.ts.map +1 -1
- package/dist/orchestrator/types.js.map +1 -1
- package/dist/parser/enhancers/PythonTypeEnhancer.d.ts +26 -0
- package/dist/parser/enhancers/PythonTypeEnhancer.d.ts.map +1 -0
- package/dist/parser/enhancers/PythonTypeEnhancer.js +440 -0
- package/dist/parser/enhancers/PythonTypeEnhancer.js.map +1 -0
- package/dist/parser/implementations/smart-parser.d.ts.map +1 -1
- package/dist/parser/implementations/smart-parser.js +7 -69
- package/dist/parser/implementations/smart-parser.js.map +1 -1
- package/dist/parser/implementations/tree-sitter-loader.d.ts +18 -0
- package/dist/parser/implementations/tree-sitter-loader.d.ts.map +1 -0
- package/dist/parser/implementations/tree-sitter-loader.js +136 -0
- package/dist/parser/implementations/tree-sitter-loader.js.map +1 -0
- package/dist/parser/index.d.ts +5 -3
- package/dist/parser/index.d.ts.map +1 -1
- package/dist/parser/index.js +68 -6
- package/dist/parser/index.js.map +1 -1
- package/dist/parser/interfaces/IParser.d.ts +19 -6
- package/dist/parser/interfaces/IParser.d.ts.map +1 -1
- package/dist/parser/interfaces/IParser.js +2 -3
- package/dist/parser/interfaces/IParser.js.map +1 -1
- package/dist/server/handlers/AnalysisHandler.d.ts +13 -2
- package/dist/server/handlers/AnalysisHandler.d.ts.map +1 -1
- package/dist/server/handlers/AnalysisHandler.js +24 -0
- package/dist/server/handlers/AnalysisHandler.js.map +1 -1
- package/dist/server/handlers/QueryHandler.d.ts.map +1 -1
- package/dist/server/handlers/QueryHandler.js +11 -30
- package/dist/server/handlers/QueryHandler.js.map +1 -1
- package/dist/server/mcp/context-tool.d.ts +9 -0
- package/dist/server/mcp/context-tool.d.ts.map +1 -0
- package/dist/server/mcp/context-tool.js +257 -0
- package/dist/server/mcp/context-tool.js.map +1 -0
- package/dist/server/mcp/schema-adapter.d.ts +55 -0
- package/dist/server/mcp/schema-adapter.d.ts.map +1 -0
- package/dist/server/mcp/schema-adapter.js +409 -0
- package/dist/server/mcp/schema-adapter.js.map +1 -0
- package/dist/server/mcp/server.d.ts +3 -3
- package/dist/server/mcp/server.d.ts.map +1 -1
- package/dist/server/mcp/server.js +134 -20
- package/dist/server/mcp/server.js.map +1 -1
- package/dist/server/mcp/service.d.ts +6 -2
- package/dist/server/mcp/service.d.ts.map +1 -1
- package/dist/server/mcp/service.js +138 -36
- package/dist/server/mcp/service.js.map +1 -1
- package/dist/server/mcp/stdio-transport.d.ts +23 -0
- package/dist/server/mcp/stdio-transport.d.ts.map +1 -0
- package/dist/server/mcp/stdio-transport.js +101 -0
- package/dist/server/mcp/stdio-transport.js.map +1 -0
- package/dist/server/mcp/types.d.ts +133 -8
- package/dist/server/mcp/types.d.ts.map +1 -1
- package/dist/server/routes/api.d.ts.map +1 -1
- package/dist/server/routes/api.js +11 -2
- package/dist/server/routes/api.js.map +1 -1
- package/docs/AI_ASSISTANT_SETUP.md +281 -12
- package/docs/API.md +170 -0
- package/docs/CONFIGURATION.md +141 -0
- package/docs/DEVELOPMENT.md +96 -0
- package/docs/GETTING-STARTED.md +114 -0
- package/docs/README.md +40 -1
- package/docs/SETUP_GUIDE.md +60 -14
- package/docs/TESTING.md +81 -0
- package/docs/ai-guide/COMMANDS.md +68 -10
- package/docs/ai-guide/INTEGRATION.md +77 -10
- package/docs/ai-guide/OUTPUT.md +345 -9
- package/docs/ai-guide/PROMPTS.md +2 -2
- package/docs/ai-guide/QUICKSTART.md +28 -1
- package/docs/ai-guide/README.md +2 -2
- package/docs/archive/ideation/2026-04-15-executable-architecture-constitution-ideation-archive.md +70 -0
- package/docs/archive/ideation/2026-04-20-mycodemap-init-enhancements-ideation-archive.md +109 -0
- package/docs/archive/ideation/2026-04-22-rules-entry-docs-optimization-consolidated-ideation-archive.md +54 -0
- package/docs/backlog.md +232 -144
- package/docs/brainstorms/2026-05-10-agent-effectiveness-validation-requirements.md +112 -0
- package/docs/generated/phase-58/subagent-evidence/claude-hook-example.json +15 -0
- package/docs/generated/phase-58/subagent-evidence/claude-session.md +146 -0
- package/docs/generated/phase-58/subagent-evidence/claude-subagent.json +28 -0
- package/docs/generated/phase-58/subagent-evidence/codex-agent-example.toml +19 -0
- package/docs/generated/phase-58/subagent-evidence/codex-session.md +150 -0
- package/docs/generated/phase-58/subagent-evidence/codex-subagent.json +20 -0
- package/docs/generated/phase-58/subagent-evidence/negative-no-retrieval.json +12 -0
- package/docs/generated/phase-58/subagent-evidence/verification-manifest.json +19 -0
- package/docs/ideation/2026-04-15-executable-architecture-constitution-ideation.md +10 -22
- package/docs/ideation/2026-04-20-mycodemap-init-enhancements-ideation.md +15 -60
- package/docs/ideation/2026-04-22-rules-entry-docs-optimization-consolidated-ideation.md +47 -52
- package/docs/ideation/2026-04-29-ux-install-agent-experience-ideation.md +256 -0
- package/docs/ideation/2026-05-02-subagent-environment-contract-injection-ideation.md +183 -0
- package/docs/ideation/2026-05-04-subagent-hooks-deep-dive-ideation.md +133 -0
- package/docs/ideation/2026-05-10-agent-effectiveness-validation-ideation.md +219 -0
- package/docs/plans/2026-04-30-install-guide-and-repo-analyzer-design.md +394 -0
- package/docs/rules/README.md +1 -0
- package/docs/rules/architecture-guardrails.md +2 -1
- package/docs/rules/engineering-with-codex-openai.md +1 -1
- package/docs/rules/harness.md +106 -0
- package/docs/rules/pre-release-checklist.md +28 -0
- package/docs/rules/testing.md +51 -0
- package/examples/claude/skills/mycodemap-repo-analyzer/SKILL.md +294 -0
- package/examples/claude/skills/mycodemap-repo-analyzer/references/analysis-guide.md +166 -0
- package/examples/claude/skills/mycodemap-repo-analyzer/references/module-analysis-guide.md +150 -0
- package/package.json +12 -4
- package/scripts/copy-build-assets.mjs +23 -0
- package/scripts/hooks/templates/pre-commit +33 -2
- package/scripts/sync-analyze-docs.js +2 -2
- package/scripts/tests/test_rule_control_workflow.py +15 -1
- package/scripts/validate-docs.js +113 -16
- package/scripts/verify-subagent-env-contract.mjs +279 -0
- package/dist/parser/implementations/tree-sitter-parser.d.ts +0 -57
- package/dist/parser/implementations/tree-sitter-parser.d.ts.map +0 -1
- package/dist/parser/implementations/tree-sitter-parser.js +0 -375
- package/dist/parser/implementations/tree-sitter-parser.js.map +0 -1
- package/docs/references/tmp.md +0 -527
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
// [META] since:2026-04-30 | owner:cli-team | stable:false
|
|
2
|
+
// [WHY] Interface contract for the `deps` command family
|
|
3
|
+
export const depsContract = {
|
|
4
|
+
name: 'deps',
|
|
5
|
+
description: '分析项目模块依赖关系',
|
|
6
|
+
stable: true,
|
|
7
|
+
args: [],
|
|
8
|
+
flags: [
|
|
9
|
+
{
|
|
10
|
+
name: 'module',
|
|
11
|
+
short: 'm',
|
|
12
|
+
long: 'module',
|
|
13
|
+
description: '查看指定模块的依赖',
|
|
14
|
+
type: 'string',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: 'json',
|
|
18
|
+
short: 'j',
|
|
19
|
+
long: 'json',
|
|
20
|
+
description: 'JSON 格式输出',
|
|
21
|
+
type: 'boolean',
|
|
22
|
+
defaultValue: false,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: 'structured',
|
|
26
|
+
long: 'structured',
|
|
27
|
+
description: '输出完全结构化的 JSON(不包含自然语言字符串,需要配合 --json 使用)',
|
|
28
|
+
type: 'boolean',
|
|
29
|
+
defaultValue: false,
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
outputShape: {
|
|
33
|
+
description: '依赖分析结果',
|
|
34
|
+
type: 'object',
|
|
35
|
+
properties: [
|
|
36
|
+
// Mode A: specific module detail (when -m is used)
|
|
37
|
+
{
|
|
38
|
+
name: 'module',
|
|
39
|
+
type: 'object',
|
|
40
|
+
nullable: true,
|
|
41
|
+
description: '指定模块的依赖详情(当使用 -m 参数时)',
|
|
42
|
+
properties: [
|
|
43
|
+
{ name: 'path', type: 'string' },
|
|
44
|
+
{ name: 'relativePath', type: 'string' },
|
|
45
|
+
{
|
|
46
|
+
name: 'location',
|
|
47
|
+
type: 'object',
|
|
48
|
+
properties: [
|
|
49
|
+
{ name: 'file', type: 'string' },
|
|
50
|
+
{ name: 'line', type: 'number' },
|
|
51
|
+
{ name: 'column', type: 'number' },
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'dependencies',
|
|
56
|
+
type: 'array',
|
|
57
|
+
items: {
|
|
58
|
+
name: 'dependencyPath',
|
|
59
|
+
type: 'string',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'dependents',
|
|
64
|
+
type: 'array',
|
|
65
|
+
items: {
|
|
66
|
+
name: 'dependentPath',
|
|
67
|
+
type: 'string',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'dependentsMap',
|
|
72
|
+
type: 'array',
|
|
73
|
+
nullable: true,
|
|
74
|
+
items: {
|
|
75
|
+
name: 'dependentEntry',
|
|
76
|
+
type: 'object',
|
|
77
|
+
properties: [
|
|
78
|
+
{ name: 'id', type: 'string' },
|
|
79
|
+
{ name: 'path', type: 'string' },
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
// Mode B: all-modules summary (when -m is omitted)
|
|
86
|
+
{
|
|
87
|
+
name: 'allDependencies',
|
|
88
|
+
type: 'object',
|
|
89
|
+
nullable: true,
|
|
90
|
+
description: '全局依赖汇总(当未使用 -m 参数时)',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: 'modules',
|
|
94
|
+
type: 'array',
|
|
95
|
+
nullable: true,
|
|
96
|
+
description: '模块列表(当未使用 -m 参数时)',
|
|
97
|
+
items: {
|
|
98
|
+
name: 'moduleSummary',
|
|
99
|
+
type: 'object',
|
|
100
|
+
properties: [
|
|
101
|
+
{ name: 'path', type: 'string' },
|
|
102
|
+
{ name: 'relativePath', type: 'string' },
|
|
103
|
+
{
|
|
104
|
+
name: 'location',
|
|
105
|
+
type: 'object',
|
|
106
|
+
properties: [
|
|
107
|
+
{ name: 'file', type: 'string' },
|
|
108
|
+
{ name: 'line', type: 'number' },
|
|
109
|
+
{ name: 'column', type: 'number' },
|
|
110
|
+
],
|
|
111
|
+
},
|
|
112
|
+
{ name: 'type', type: 'string' },
|
|
113
|
+
{ name: 'count', type: 'number' },
|
|
114
|
+
],
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
},
|
|
119
|
+
errorCodes: [
|
|
120
|
+
{ code: 'INDEX_NOT_FOUND', description: '代码地图索引不存在,需先运行 generate' },
|
|
121
|
+
{ code: 'MODULE_NOT_FOUND', description: '指定的模块路径未找到' },
|
|
122
|
+
{ code: 'PARSE_ERROR', description: '代码地图 JSON 解析失败' },
|
|
123
|
+
],
|
|
124
|
+
examples: [
|
|
125
|
+
'codemap deps -m src/index.ts --json',
|
|
126
|
+
'codemap deps --json --structured',
|
|
127
|
+
'codemap deps -m src/utils/helpers.ts',
|
|
128
|
+
],
|
|
129
|
+
};
|
|
130
|
+
//# sourceMappingURL=deps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deps.js","sourceRoot":"","sources":["../../../../src/cli/interface-contract/commands/deps.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,yDAAyD;AAIzD,MAAM,CAAC,MAAM,YAAY,GAAoB;IAC3C,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,YAAY;IACzB,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,EAAE;IACR,KAAK,EAAE;QACL;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,GAAG;YACV,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,QAAQ;SACf;QACD;YACE,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,GAAG;YACV,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,SAAS;YACf,YAAY,EAAE,KAAK;SACpB;QACD;YACE,IAAI,EAAE,YAAY;YAClB,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,0CAA0C;YACvD,IAAI,EAAE,SAAS;YACf,YAAY,EAAE,KAAK;SACpB;KACF;IACD,WAAW,EAAE;QACX,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,mDAAmD;YACnD;gBACE,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,uBAAuB;gBACpC,UAAU,EAAE;oBACV,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAChC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE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AE,IAAI,EAAE,QAAQ,EAAE;wBAChC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACxC;4BACE,IAAI,EAAE,UAAU;4BAChB,IAAI,EAAE,QAAQ;4BACd,UAAU,EAAE;gCACV,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;gCAChC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;gCAChC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;6BACnC;yBACF;wBACD,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAChC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE;qBAClC;iBACF;aACF;SACF;KACF;IACD,UAAU,EAAE;QACV,EAAE,IAAI,EAAE,iBAAiB,EAAE,WAAW,EAAE,yBAAyB,EAAE;QACnE,EAAE,IAAI,EAAE,kBAAkB,EAAE,WAAW,EAAE,YAAY,EAAE;QACvD,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE;KACvD;IACD,QAAQ,EAAE;QACR,qCAAqC;QACrC,kCAAkC;QAClC,sCAAsC;KACvC;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../../src/cli/interface-contract/commands/doctor.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,cAAc,EAAE,eAwD5B,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// [META] since:2026-05-01 | owner:cli-team | stable:false
|
|
2
|
+
// [WHY] Interface contract for the `doctor` command family
|
|
3
|
+
export const doctorContract = {
|
|
4
|
+
name: 'doctor',
|
|
5
|
+
description: '诊断 CodeMap 生态系统健康状况',
|
|
6
|
+
stable: true,
|
|
7
|
+
args: [],
|
|
8
|
+
flags: [
|
|
9
|
+
{
|
|
10
|
+
name: 'json',
|
|
11
|
+
short: 'j',
|
|
12
|
+
long: 'json',
|
|
13
|
+
description: 'JSON 格式输出诊断结果',
|
|
14
|
+
type: 'boolean',
|
|
15
|
+
defaultValue: false,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'human',
|
|
19
|
+
long: 'human',
|
|
20
|
+
description: '强制人类可读输出',
|
|
21
|
+
type: 'boolean',
|
|
22
|
+
defaultValue: false,
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
outputShape: {
|
|
26
|
+
description: '诊断报告',
|
|
27
|
+
type: 'object',
|
|
28
|
+
properties: [
|
|
29
|
+
{
|
|
30
|
+
name: 'exitCode',
|
|
31
|
+
type: 'number',
|
|
32
|
+
description: '退出码(0 = 健康,1 = 有问题)',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'results',
|
|
36
|
+
type: 'array',
|
|
37
|
+
description: '诊断结果列表',
|
|
38
|
+
items: {
|
|
39
|
+
name: 'diagnostic',
|
|
40
|
+
type: 'object',
|
|
41
|
+
properties: [
|
|
42
|
+
{ name: 'category', type: 'string', description: '诊断类别: install | config | runtime | agent' },
|
|
43
|
+
{ name: 'severity', type: 'string', description: '严重级别: info | warning | error' },
|
|
44
|
+
{ name: 'message', type: 'string' },
|
|
45
|
+
{ name: 'check', type: 'string', description: '检查项名称' },
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
errorCodes: [
|
|
52
|
+
{ code: 'DOCTOR_RUNTIME_ERROR', description: '诊断运行时出错' },
|
|
53
|
+
],
|
|
54
|
+
examples: [
|
|
55
|
+
'codemap doctor',
|
|
56
|
+
'codemap doctor --json',
|
|
57
|
+
'codemap doctor --human',
|
|
58
|
+
],
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=doctor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../../../src/cli/interface-contract/commands/doctor.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,2DAA2D;AAI3D,MAAM,CAAC,MAAM,cAAc,GAAoB;IAC7C,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,qBAAqB;IAClC,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,EAAE;IACR,KAAK,EAAE;QACL;YACE,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,GAAG;YACV,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,eAAe;YAC5B,IAAI,EAAE,SAAS;YACf,YAAY,EAAE,KAAK;SACpB;QACD;YACE,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,UAAU;YACvB,IAAI,EAAE,SAAS;YACf,YAAY,EAAE,KAAK;SACpB;KACF;IACD,WAAW,EAAE;QACX,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV;gBACE,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,qBAAqB;aACnC;YACD;gBACE,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,QAAQ;gBACrB,KAAK,EAAE;oBACL,IAAI,EAAE,YAAY;oBAClB,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,0CAA0C,EAAE;wBAC7F,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8BAA8B,EAAE;wBACjF,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACnC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE;qBACxD;iBACF;aACF;SACF;KACF;IACD,UAAU,EAAE;QACV,EAAE,IAAI,EAAE,sBAAsB,EAAE,WAAW,EAAE,SAAS,EAAE;KACzD;IACD,QAAQ,EAAE;QACR,gBAAgB;QAChB,uBAAuB;QACvB,wBAAwB;KACzB;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-contract.d.ts","sourceRoot":"","sources":["../../../../src/cli/interface-contract/commands/env-contract.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,mBAAmB,EAAE,eAoKjC,CAAC"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
// [META] since:2026-05-02 | owner:cli-team | stable:false
|
|
2
|
+
// [WHY] Interface contract for the `env-contract` command — subagent rule retrieval surface.
|
|
3
|
+
export const envContractContract = {
|
|
4
|
+
name: 'env-contract',
|
|
5
|
+
aliases: ['env_contract'],
|
|
6
|
+
description: 'Query the Project Environment Contract for subagent rule retrieval',
|
|
7
|
+
stable: true,
|
|
8
|
+
args: [],
|
|
9
|
+
flags: [
|
|
10
|
+
{
|
|
11
|
+
name: 'json',
|
|
12
|
+
short: 'j',
|
|
13
|
+
long: 'json',
|
|
14
|
+
description: 'Output contract as JSON',
|
|
15
|
+
type: 'boolean',
|
|
16
|
+
defaultValue: false,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'human',
|
|
20
|
+
long: 'human',
|
|
21
|
+
description: 'Force human-readable output',
|
|
22
|
+
type: 'boolean',
|
|
23
|
+
defaultValue: false,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'for',
|
|
27
|
+
long: 'for',
|
|
28
|
+
description: 'Agent type filter: explore|plan|edit|worker|review|verify|default',
|
|
29
|
+
type: 'string',
|
|
30
|
+
defaultValue: undefined,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'category',
|
|
34
|
+
long: 'category',
|
|
35
|
+
description: 'Contract category filter: execution|commit|retrieval|validation|style',
|
|
36
|
+
type: 'string',
|
|
37
|
+
defaultValue: undefined,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'check',
|
|
41
|
+
long: 'check',
|
|
42
|
+
description: 'Check contract freshness and critical coverage',
|
|
43
|
+
type: 'boolean',
|
|
44
|
+
defaultValue: false,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'update',
|
|
48
|
+
long: 'update',
|
|
49
|
+
description: 'Regenerate .mycodemap/env-contract.json',
|
|
50
|
+
type: 'boolean',
|
|
51
|
+
defaultValue: false,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'asHookConfig',
|
|
55
|
+
long: 'as-hook-config',
|
|
56
|
+
description: 'Print Claude Code SubagentStart hook example',
|
|
57
|
+
type: 'boolean',
|
|
58
|
+
defaultValue: false,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'asCodexAgent',
|
|
62
|
+
long: 'as-codex-agent',
|
|
63
|
+
description: 'Print Codex agent developer_instructions example',
|
|
64
|
+
type: 'boolean',
|
|
65
|
+
defaultValue: false,
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
outputShape: {
|
|
69
|
+
description: 'Project Environment Contract query result',
|
|
70
|
+
type: 'object',
|
|
71
|
+
properties: [
|
|
72
|
+
{ name: 'schemaVersion', type: 'string', description: 'Contract schema version (env-contract.v1)' },
|
|
73
|
+
{ name: 'generatedAt', type: 'string', description: 'ISO timestamp of contract generation' },
|
|
74
|
+
{ name: 'agentType', type: 'string', description: 'Agent type used for filtering' },
|
|
75
|
+
{
|
|
76
|
+
name: 'items',
|
|
77
|
+
type: 'array',
|
|
78
|
+
description: 'Filtered contract items',
|
|
79
|
+
items: {
|
|
80
|
+
name: 'item',
|
|
81
|
+
type: 'object',
|
|
82
|
+
properties: [
|
|
83
|
+
{ name: 'id', type: 'string', description: 'Unique contract item identifier' },
|
|
84
|
+
{ name: 'category', type: 'string', description: 'Contract category: execution|commit|retrieval|validation|style' },
|
|
85
|
+
{ name: 'severity', type: 'string', description: 'Severity level: critical|high|medium|low' },
|
|
86
|
+
{ name: 'content', type: 'string', description: 'Human-readable contract rule' },
|
|
87
|
+
{
|
|
88
|
+
name: 'sources',
|
|
89
|
+
type: 'array',
|
|
90
|
+
description: 'Source file references',
|
|
91
|
+
items: {
|
|
92
|
+
name: 'source',
|
|
93
|
+
type: 'object',
|
|
94
|
+
properties: [
|
|
95
|
+
{ name: 'file', type: 'string', description: 'Source file path' },
|
|
96
|
+
{ name: 'line', type: 'number', description: 'Source line number', nullable: true },
|
|
97
|
+
{ name: 'hash', type: 'string', description: 'Content hash' },
|
|
98
|
+
{ name: 'authority', type: 'string', description: 'Source authority: executable|governance|generated|example' },
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: 'conflicts',
|
|
107
|
+
type: 'array',
|
|
108
|
+
description: 'Detected conflicts between sources',
|
|
109
|
+
items: {
|
|
110
|
+
name: 'conflict',
|
|
111
|
+
type: 'object',
|
|
112
|
+
properties: [
|
|
113
|
+
{ name: 'id', type: 'string' },
|
|
114
|
+
{ name: 'severity', type: 'string' },
|
|
115
|
+
{ name: 'description', type: 'string' },
|
|
116
|
+
{ name: 'recommendation', type: 'string' },
|
|
117
|
+
],
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: 'sourceSnapshots',
|
|
122
|
+
type: 'array',
|
|
123
|
+
description: 'Hash snapshots of source files',
|
|
124
|
+
items: {
|
|
125
|
+
name: 'snapshot',
|
|
126
|
+
type: 'object',
|
|
127
|
+
properties: [
|
|
128
|
+
{ name: 'file', type: 'string' },
|
|
129
|
+
{ name: 'hash', type: 'string' },
|
|
130
|
+
{ name: 'lastModified', type: 'string' },
|
|
131
|
+
],
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: 'diagnostics',
|
|
136
|
+
type: 'array',
|
|
137
|
+
description: 'Check diagnostics (only present with --check)',
|
|
138
|
+
nullable: true,
|
|
139
|
+
items: {
|
|
140
|
+
name: 'diagnostic',
|
|
141
|
+
type: 'object',
|
|
142
|
+
properties: [
|
|
143
|
+
{ name: 'id', type: 'string' },
|
|
144
|
+
{ name: 'severity', type: 'string' },
|
|
145
|
+
{ name: 'message', type: 'string' },
|
|
146
|
+
{ name: 'remediation', type: 'string' },
|
|
147
|
+
],
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
|
+
},
|
|
152
|
+
errorCodes: [
|
|
153
|
+
{ code: 'ENV_CONTRACT_NOT_FOUND', description: 'No contract file and discovery failed' },
|
|
154
|
+
{ code: 'ENV_CONTRACT_SCHEMA_INVALID', description: 'Contract file fails schema validation' },
|
|
155
|
+
{ code: 'ENV_CONTRACT_CHECK_FAILED', description: 'Contract check detected errors (exit code 1)' },
|
|
156
|
+
{ code: 'ENV_CONTRACT_CHECK_WARN', description: 'Contract check detected warnings (exit code 2)' },
|
|
157
|
+
],
|
|
158
|
+
examples: [
|
|
159
|
+
'codemap env-contract',
|
|
160
|
+
'codemap env-contract --for worker --json',
|
|
161
|
+
'codemap env-contract --check',
|
|
162
|
+
'codemap env-contract --update',
|
|
163
|
+
'codemap env-contract --as-hook-config',
|
|
164
|
+
'codemap env-contract --as-codex-agent',
|
|
165
|
+
'codemap env-contract --category commit --json',
|
|
166
|
+
],
|
|
167
|
+
};
|
|
168
|
+
//# sourceMappingURL=env-contract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-contract.js","sourceRoot":"","sources":["../../../../src/cli/interface-contract/commands/env-contract.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,6FAA6F;AAI7F,MAAM,CAAC,MAAM,mBAAmB,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d,UAAU,EAAE;wBACV,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAC9B,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACpC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACnC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE;qBACxC;iBACF;aACF;SACF;KACF;IACD,UAAU,EAAE;QACV,EAAE,IAAI,EAAE,wBAAwB,EAAE,WAAW,EAAE,uCAAuC,EAAE;QACxF,EAAE,IAAI,EAAE,6BAA6B,EAAE,WAAW,EAAE,uCAAuC,EAAE;QAC7F,EAAE,IAAI,EAAE,2BAA2B,EAAE,WAAW,EAAE,8CAA8C,EAAE;QAClG,EAAE,IAAI,EAAE,yBAAyB,EAAE,WAAW,EAAE,gDAAgD,EAAE;KACnG;IACD,QAAQ,EAAE;QACR,sBAAsB;QACtB,0CAA0C;QAC1C,8BAA8B;QAC9B,+BAA+B;QAC/B,uCAAuC;QACvC,uCAAuC;QACvC,+CAA+C;KAChD;CACF,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { analyzeContract } from './analyze.js';
|
|
2
|
+
import { queryContract } from './query.js';
|
|
3
|
+
import { depsContract } from './deps.js';
|
|
4
|
+
import { doctorContract } from './doctor.js';
|
|
5
|
+
import { benchmarkContract } from './benchmark.js';
|
|
6
|
+
import { initContract } from './init.js';
|
|
7
|
+
import { previewContract } from './preview.js';
|
|
8
|
+
import { envContractContract } from './env-contract.js';
|
|
9
|
+
import { agentMetricsContract } from './agent-metrics.js';
|
|
10
|
+
export declare const commandContracts: readonly [import("../types.js").CommandContract, import("../types.js").CommandContract, import("../types.js").CommandContract, import("../types.js").CommandContract, import("../types.js").CommandContract, import("../types.js").CommandContract, import("../types.js").CommandContract, import("../types.js").CommandContract, import("../types.js").CommandContract];
|
|
11
|
+
export { analyzeContract, queryContract, depsContract, doctorContract, benchmarkContract, initContract, previewContract, envContractContract, agentMetricsContract };
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cli/interface-contract/commands/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,eAAO,MAAM,gBAAgB,0WAUnB,CAAC;AAEX,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// [META] since:2026-04-30 | owner:cli-team | stable:false
|
|
2
|
+
// [WHY] Registry of all command contracts — central catalog for schema generation and validation
|
|
3
|
+
import { analyzeContract } from './analyze.js';
|
|
4
|
+
import { queryContract } from './query.js';
|
|
5
|
+
import { depsContract } from './deps.js';
|
|
6
|
+
import { doctorContract } from './doctor.js';
|
|
7
|
+
import { benchmarkContract } from './benchmark.js';
|
|
8
|
+
import { initContract } from './init.js';
|
|
9
|
+
import { previewContract } from './preview.js';
|
|
10
|
+
import { envContractContract } from './env-contract.js';
|
|
11
|
+
import { agentMetricsContract } from './agent-metrics.js';
|
|
12
|
+
export const commandContracts = [
|
|
13
|
+
analyzeContract,
|
|
14
|
+
queryContract,
|
|
15
|
+
depsContract,
|
|
16
|
+
doctorContract,
|
|
17
|
+
benchmarkContract,
|
|
18
|
+
initContract,
|
|
19
|
+
previewContract,
|
|
20
|
+
envContractContract,
|
|
21
|
+
agentMetricsContract,
|
|
22
|
+
];
|
|
23
|
+
export { analyzeContract, queryContract, depsContract, doctorContract, benchmarkContract, initContract, previewContract, envContractContract, agentMetricsContract };
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/cli/interface-contract/commands/index.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,iGAAiG;AAEjG,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,eAAe;IACf,aAAa;IACb,YAAY;IACZ,cAAc;IACd,iBAAiB;IACjB,YAAY;IACZ,eAAe;IACf,mBAAmB;IACnB,oBAAoB;CACZ,CAAC;AAEX,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/cli/interface-contract/commands/init.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,YAAY,EAAE,eA4F1B,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// [META] since:2026-05-01 | owner:cli-team | stable:false
|
|
2
|
+
// [WHY] Interface contract for the `init` command family
|
|
3
|
+
export const initContract = {
|
|
4
|
+
name: 'init',
|
|
5
|
+
description: '初始化并收敛 CodeMap 项目状态',
|
|
6
|
+
stable: true,
|
|
7
|
+
args: [],
|
|
8
|
+
flags: [
|
|
9
|
+
{
|
|
10
|
+
name: 'yes',
|
|
11
|
+
short: 'y',
|
|
12
|
+
long: 'yes',
|
|
13
|
+
description: '使用默认配置,不询问',
|
|
14
|
+
type: 'boolean',
|
|
15
|
+
defaultValue: false,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'interactive',
|
|
19
|
+
long: 'interactive',
|
|
20
|
+
description: '仅显示 reconciliation preview,不写入文件',
|
|
21
|
+
type: 'boolean',
|
|
22
|
+
defaultValue: false,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: 'json',
|
|
26
|
+
short: 'j',
|
|
27
|
+
long: 'json',
|
|
28
|
+
description: 'JSON 格式输出收据',
|
|
29
|
+
type: 'boolean',
|
|
30
|
+
defaultValue: false,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'profile',
|
|
34
|
+
long: 'profile',
|
|
35
|
+
description: '跳过检测,直接应用指定内置 profile',
|
|
36
|
+
type: 'string',
|
|
37
|
+
defaultValue: undefined,
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
outputShape: {
|
|
41
|
+
description: '初始化结果收据',
|
|
42
|
+
type: 'object',
|
|
43
|
+
properties: [
|
|
44
|
+
{
|
|
45
|
+
name: 'converged',
|
|
46
|
+
type: 'boolean',
|
|
47
|
+
description: '是否已收敛',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: 'configPath',
|
|
51
|
+
type: 'string',
|
|
52
|
+
nullable: true,
|
|
53
|
+
description: '配置文件路径',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'created',
|
|
57
|
+
type: 'array',
|
|
58
|
+
description: '创建的文件列表',
|
|
59
|
+
items: {
|
|
60
|
+
name: 'file',
|
|
61
|
+
type: 'object',
|
|
62
|
+
properties: [
|
|
63
|
+
{ name: 'path', type: 'string' },
|
|
64
|
+
{ name: 'type', type: 'string', description: 'config | hook | rule | receipt' },
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: 'warnings',
|
|
70
|
+
type: 'array',
|
|
71
|
+
nullable: true,
|
|
72
|
+
description: '警告信息',
|
|
73
|
+
items: {
|
|
74
|
+
name: 'warning',
|
|
75
|
+
type: 'object',
|
|
76
|
+
properties: [
|
|
77
|
+
{ name: 'message', type: 'string' },
|
|
78
|
+
{ name: 'severity', type: 'string' },
|
|
79
|
+
],
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
errorCodes: [
|
|
85
|
+
{ code: 'INIT_ALREADY_INITIALIZED', description: '项目已初始化,使用 --yes 强制覆盖' },
|
|
86
|
+
{ code: 'INIT_CWD_NOT_FOUND', description: '当前目录不存在' },
|
|
87
|
+
],
|
|
88
|
+
examples: [
|
|
89
|
+
'codemap init',
|
|
90
|
+
'codemap init -y',
|
|
91
|
+
'codemap init --interactive',
|
|
92
|
+
'codemap init --json',
|
|
93
|
+
'codemap init --profile nodejs',
|
|
94
|
+
],
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../src/cli/interface-contract/commands/init.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,yDAAyD;AAIzD,MAAM,CAAC,MAAM,YAAY,GAAoB;IAC3C,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,qBAAqB;IAClC,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,EAAE;IACR,KAAK,EAAE;QACL;YACE,IAAI,EAAE,KAAK;YACX,KAAK,EAAE,GAAG;YACV,IAAI,EAAE,KAAK;YACX,WAAW,EAAE,YAAY;YACzB,IAAI,EAAE,SAAS;YACf,YAAY,EAAE,KAAK;SACpB;QACD;YACE,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,kCAAkC;YAC/C,IAAI,EAAE,SAAS;YACf,YAAY,EAAE,KAAK;SACpB;QACD;YACE,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,GAAG;YACV,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,aAAa;YAC1B,IAAI,EAAE,SAAS;YACf,YAAY,EAAE,KAAK;SACpB;QACD;YACE,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,uBAAuB;YACpC,IAAI,EAAE,QAAQ;YACd,YAAY,EAAE,SAAS;SACxB;KACF;IACD,WAAW,EAAE;QACX,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV;gBACE,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,OAAO;aACrB;YACD;gBACE,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,QAAQ;aACtB;YACD;gBACE,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,SAAS;gBACtB,KAAK,EAAE;oBACL,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAChC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,gCAAgC,EAAE;qBAChF;iBACF;aACF;YACD;gBACE,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,MAAM;gBACnB,KAAK,EAAE;oBACL,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACnC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE;qBACrC;iBACF;aACF;SACF;KACF;IACD,UAAU,EAAE;QACV,EAAE,IAAI,EAAE,0BAA0B,EAAE,WAAW,EAAE,sBAAsB,EAAE;QACzE,EAAE,IAAI,EAAE,oBAAoB,EAAE,WAAW,EAAE,SAAS,EAAE;KACvD;IACD,QAAQ,EAAE;QACR,cAAc;QACd,iBAAiB;QACjB,4BAA4B;QAC5B,qBAAqB;QACrB,+BAA+B;KAChC;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../../../src/cli/interface-contract/commands/preview.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,eAAe,EAAE,eAkH7B,CAAC"}
|