homegraph 1.4.1 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +305 -268
- package/dist/bin/command-supervision.d.ts.map +1 -1
- package/dist/bin/command-supervision.js +7 -4
- package/dist/bin/command-supervision.js.map +1 -1
- package/dist/bin/homegraph.js +304 -81
- package/dist/bin/homegraph.js.map +1 -1
- package/dist/context/index.d.ts.map +1 -1
- package/dist/context/index.js +32 -11
- package/dist/context/index.js.map +1 -1
- package/dist/db/index.d.ts +143 -1
- package/dist/db/index.d.ts.map +1 -1
- package/dist/db/index.js +305 -28
- package/dist/db/index.js.map +1 -1
- package/dist/db/migrations.js +37 -37
- package/dist/db/queries.d.ts +43 -4
- package/dist/db/queries.d.ts.map +1 -1
- package/dist/db/queries.js +294 -170
- package/dist/db/queries.js.map +1 -1
- package/dist/db/schema.sql +203 -203
- package/dist/db/sqlite-adapter.d.ts +24 -17
- package/dist/db/sqlite-adapter.d.ts.map +1 -1
- package/dist/db/sqlite-adapter.js +292 -36
- package/dist/db/sqlite-adapter.js.map +1 -1
- package/dist/db/wal-valve.d.ts +15 -2
- package/dist/db/wal-valve.d.ts.map +1 -1
- package/dist/db/wal-valve.js +88 -6
- package/dist/db/wal-valve.js.map +1 -1
- package/dist/directory.js +5 -5
- package/dist/extraction/arkts-batch-worker.js +3 -2
- package/dist/extraction/arkts-batch-worker.js.map +1 -1
- package/dist/extraction/default-ignore.d.ts +39 -0
- package/dist/extraction/default-ignore.d.ts.map +1 -0
- package/dist/extraction/default-ignore.js +221 -0
- package/dist/extraction/default-ignore.js.map +1 -0
- package/dist/extraction/index.d.ts +9 -10
- package/dist/extraction/index.d.ts.map +1 -1
- package/dist/extraction/index.js +227 -323
- package/dist/extraction/index.js.map +1 -1
- package/dist/extraction/languages/arkts-viewtree.d.ts +2 -4
- package/dist/extraction/languages/arkts-viewtree.d.ts.map +1 -1
- package/dist/extraction/languages/arkts-viewtree.js +6 -21
- package/dist/extraction/languages/arkts-viewtree.js.map +1 -1
- package/dist/extraction/languages/arkts.d.ts +100 -6
- package/dist/extraction/languages/arkts.d.ts.map +1 -1
- package/dist/extraction/languages/arkts.js +1777 -173
- package/dist/extraction/languages/arkts.js.map +1 -1
- package/dist/extraction/store-worker.d.ts +20 -0
- package/dist/extraction/store-worker.d.ts.map +1 -0
- package/dist/extraction/store-worker.js +102 -0
- package/dist/extraction/store-worker.js.map +1 -0
- package/dist/extraction/store-writer.d.ts +48 -0
- package/dist/extraction/store-writer.d.ts.map +1 -0
- package/dist/extraction/store-writer.js +167 -0
- package/dist/extraction/store-writer.js.map +1 -0
- package/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/dist/extraction/tree-sitter.js +47 -0
- package/dist/extraction/tree-sitter.js.map +1 -1
- package/dist/extraction/wasm/tree-sitter-c_sharp.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-cfml.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-cfquery.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-cfscript.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-cobol.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-erlang.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-nix.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
- package/dist/extraction/wasm-runtime-flags.d.ts +14 -4
- package/dist/extraction/wasm-runtime-flags.d.ts.map +1 -1
- package/dist/extraction/wasm-runtime-flags.js +55 -7
- package/dist/extraction/wasm-runtime-flags.js.map +1 -1
- package/dist/index.d.ts +16 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +135 -97
- package/dist/index.js.map +1 -1
- package/dist/installer/instructions-template.js +9 -9
- package/dist/mcp/liveness-watchdog.d.ts +18 -0
- package/dist/mcp/liveness-watchdog.d.ts.map +1 -1
- package/dist/mcp/liveness-watchdog.js +185 -73
- package/dist/mcp/liveness-watchdog.js.map +1 -1
- package/dist/mcp/query-worker.d.ts +2 -2
- package/dist/mcp/query-worker.js +2 -2
- package/dist/mcp/server-instructions.js +47 -47
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +42 -26
- package/dist/mcp/tools.js.map +1 -1
- package/dist/reasoning/reasoner.js +32 -32
- package/dist/resolution/callback-synthesizer.d.ts +52 -16
- package/dist/resolution/callback-synthesizer.d.ts.map +1 -1
- package/dist/resolution/callback-synthesizer.js +234 -180
- package/dist/resolution/callback-synthesizer.js.map +1 -1
- package/dist/resolution/cooperative-yield.d.ts +10 -2
- package/dist/resolution/cooperative-yield.d.ts.map +1 -1
- package/dist/resolution/cooperative-yield.js +6 -4
- package/dist/resolution/cooperative-yield.js.map +1 -1
- package/dist/resolution/frameworks/go.d.ts.map +1 -1
- package/dist/resolution/frameworks/go.js +29 -6
- package/dist/resolution/frameworks/go.js.map +1 -1
- package/dist/resolution/import-resolver.d.ts +2 -3
- package/dist/resolution/import-resolver.d.ts.map +1 -1
- package/dist/resolution/import-resolver.js +166 -7
- package/dist/resolution/import-resolver.js.map +1 -1
- package/dist/resolution/index.d.ts +87 -2
- package/dist/resolution/index.d.ts.map +1 -1
- package/dist/resolution/index.js +739 -131
- package/dist/resolution/index.js.map +1 -1
- package/dist/resolution/memory-budget.d.ts +48 -0
- package/dist/resolution/memory-budget.d.ts.map +1 -0
- package/dist/resolution/memory-budget.js +162 -0
- package/dist/resolution/memory-budget.js.map +1 -0
- package/dist/resolution/name-matcher.d.ts +12 -1
- package/dist/resolution/name-matcher.d.ts.map +1 -1
- package/dist/resolution/name-matcher.js +439 -97
- package/dist/resolution/name-matcher.js.map +1 -1
- package/dist/resolution/resolver-pool.d.ts +106 -0
- package/dist/resolution/resolver-pool.d.ts.map +1 -0
- package/dist/resolution/resolver-pool.js +344 -0
- package/dist/resolution/resolver-pool.js.map +1 -0
- package/dist/resolution/resolver-worker.d.ts +17 -0
- package/dist/resolution/resolver-worker.d.ts.map +1 -0
- package/dist/resolution/resolver-worker.js +141 -0
- package/dist/resolution/resolver-worker.js.map +1 -0
- package/dist/resolution/types.d.ts +3 -0
- package/dist/resolution/types.d.ts.map +1 -1
- package/dist/spec/build/diff-parser.d.ts +55 -0
- package/dist/spec/build/diff-parser.d.ts.map +1 -0
- package/dist/spec/build/diff-parser.js +205 -0
- package/dist/spec/build/diff-parser.js.map +1 -0
- package/dist/spec/build/pipeline.d.ts +54 -0
- package/dist/spec/build/pipeline.d.ts.map +1 -0
- package/dist/spec/build/pipeline.js +170 -0
- package/dist/spec/build/pipeline.js.map +1 -0
- package/dist/spec/build/scan.d.ts +48 -0
- package/dist/spec/build/scan.d.ts.map +1 -0
- package/dist/spec/build/scan.js +89 -0
- package/dist/spec/build/scan.js.map +1 -0
- package/dist/spec/build/scope-resolver.d.ts +50 -0
- package/dist/spec/build/scope-resolver.d.ts.map +1 -0
- package/dist/spec/build/scope-resolver.js +105 -0
- package/dist/spec/build/scope-resolver.js.map +1 -0
- package/dist/spec/build/spec-extractor.d.ts +74 -0
- package/dist/spec/build/spec-extractor.d.ts.map +1 -0
- package/dist/spec/build/spec-extractor.js +344 -0
- package/dist/spec/build/spec-extractor.js.map +1 -0
- package/dist/spec/config.d.ts +35 -1
- package/dist/spec/config.d.ts.map +1 -1
- package/dist/spec/config.js +30 -5
- package/dist/spec/config.js.map +1 -1
- package/dist/spec/db/commit-node.js +4 -4
- package/dist/spec/db/fragment-node.js +10 -10
- package/dist/spec/db/fts.d.ts.map +1 -1
- package/dist/spec/db/fts.js +27 -58
- package/dist/spec/db/fts.js.map +1 -1
- package/dist/spec/db/index.d.ts +5 -3
- package/dist/spec/db/index.d.ts.map +1 -1
- package/dist/spec/db/index.js +16 -1
- package/dist/spec/db/index.js.map +1 -1
- package/dist/spec/db/persist.d.ts +45 -0
- package/dist/spec/db/persist.d.ts.map +1 -0
- package/dist/spec/db/persist.js +66 -0
- package/dist/spec/db/persist.js.map +1 -0
- package/dist/spec/db/relations.d.ts +80 -1
- package/dist/spec/db/relations.d.ts.map +1 -1
- package/dist/spec/db/relations.js +218 -47
- package/dist/spec/db/relations.js.map +1 -1
- package/dist/spec/db/schema.d.ts +4 -0
- package/dist/spec/db/schema.d.ts.map +1 -1
- package/dist/spec/db/schema.js +10 -6
- package/dist/spec/db/schema.js.map +1 -1
- package/dist/spec/db/schema.sql +121 -117
- package/dist/spec/db/spec-node.d.ts +5 -0
- package/dist/spec/db/spec-node.d.ts.map +1 -1
- package/dist/spec/db/spec-node.js +15 -9
- package/dist/spec/db/spec-node.js.map +1 -1
- package/dist/spec/db/sql-utils.d.ts +11 -0
- package/dist/spec/db/sql-utils.d.ts.map +1 -0
- package/dist/spec/db/sql-utils.js +19 -0
- package/dist/spec/db/sql-utils.js.map +1 -0
- package/dist/spec/evolve/cluster-context.d.ts +30 -0
- package/dist/spec/evolve/cluster-context.d.ts.map +1 -0
- package/dist/spec/evolve/cluster-context.js +78 -0
- package/dist/spec/evolve/cluster-context.js.map +1 -0
- package/dist/spec/evolve/commit-spec-analyzer.d.ts +51 -0
- package/dist/spec/evolve/commit-spec-analyzer.d.ts.map +1 -0
- package/dist/spec/evolve/commit-spec-analyzer.js +88 -0
- package/dist/spec/evolve/commit-spec-analyzer.js.map +1 -0
- package/dist/spec/evolve/commit-spec-persister.d.ts +53 -0
- package/dist/spec/evolve/commit-spec-persister.d.ts.map +1 -0
- package/dist/spec/evolve/commit-spec-persister.js +93 -0
- package/dist/spec/evolve/commit-spec-persister.js.map +1 -0
- package/dist/spec/evolve/impact-locator.d.ts +23 -7
- package/dist/spec/evolve/impact-locator.d.ts.map +1 -1
- package/dist/spec/evolve/impact-locator.js +58 -14
- package/dist/spec/evolve/impact-locator.js.map +1 -1
- package/dist/spec/evolve/pipeline.d.ts +62 -25
- package/dist/spec/evolve/pipeline.d.ts.map +1 -1
- package/dist/spec/evolve/pipeline.js +436 -457
- package/dist/spec/evolve/pipeline.js.map +1 -1
- package/dist/spec/evolve/spec-rewriter.d.ts +13 -13
- package/dist/spec/evolve/spec-rewriter.d.ts.map +1 -1
- package/dist/spec/evolve/spec-rewriter.js +45 -45
- package/dist/spec/evolve/spec-rewriter.js.map +1 -1
- package/dist/spec/git/commits.d.ts +85 -0
- package/dist/spec/git/commits.d.ts.map +1 -0
- package/dist/spec/git/commits.js +218 -0
- package/dist/spec/git/commits.js.map +1 -0
- package/dist/spec/git/exec.d.ts +13 -0
- package/dist/spec/git/exec.d.ts.map +1 -0
- package/dist/spec/git/exec.js +19 -0
- package/dist/spec/git/exec.js.map +1 -0
- package/dist/spec/git/index.d.ts +9 -0
- package/dist/spec/git/index.d.ts.map +1 -0
- package/dist/spec/git/index.js +22 -0
- package/dist/spec/git/index.js.map +1 -0
- package/dist/spec/graph/index.d.ts +8 -0
- package/dist/spec/graph/index.d.ts.map +1 -0
- package/dist/spec/graph/index.js +17 -0
- package/dist/spec/graph/index.js.map +1 -0
- package/dist/spec/graph/queries.d.ts +6 -35
- package/dist/spec/graph/queries.d.ts.map +1 -1
- package/dist/spec/graph/queries.js +71 -248
- package/dist/spec/graph/queries.js.map +1 -1
- package/dist/spec/llm/agent-client.d.ts +59 -0
- package/dist/spec/llm/agent-client.d.ts.map +1 -0
- package/dist/spec/llm/agent-client.js +213 -0
- package/dist/spec/llm/agent-client.js.map +1 -0
- package/dist/spec/llm/agents/claude-code.d.ts +32 -0
- package/dist/spec/llm/agents/claude-code.d.ts.map +1 -0
- package/dist/spec/llm/agents/claude-code.js +125 -0
- package/dist/spec/llm/agents/claude-code.js.map +1 -0
- package/dist/spec/llm/agents/codex.d.ts +32 -0
- package/dist/spec/llm/agents/codex.d.ts.map +1 -0
- package/dist/spec/llm/agents/codex.js +145 -0
- package/dist/spec/llm/agents/codex.js.map +1 -0
- package/dist/spec/llm/agents/detect-utils.d.ts +28 -0
- package/dist/spec/llm/agents/detect-utils.d.ts.map +1 -0
- package/dist/spec/llm/agents/detect-utils.js +91 -0
- package/dist/spec/llm/agents/detect-utils.js.map +1 -0
- package/dist/spec/llm/agents/deveco-code.d.ts +33 -0
- package/dist/spec/llm/agents/deveco-code.d.ts.map +1 -0
- package/dist/spec/llm/agents/deveco-code.js +165 -0
- package/dist/spec/llm/agents/deveco-code.js.map +1 -0
- package/dist/spec/llm/agents/index.d.ts +31 -0
- package/dist/spec/llm/agents/index.d.ts.map +1 -0
- package/dist/spec/llm/agents/index.js +65 -0
- package/dist/spec/llm/agents/index.js.map +1 -0
- package/dist/spec/llm/agents/types.d.ts +76 -0
- package/dist/spec/llm/agents/types.d.ts.map +1 -0
- package/dist/spec/llm/agents/types.js +15 -0
- package/dist/spec/llm/agents/types.js.map +1 -0
- package/dist/spec/llm/client.d.ts +31 -11
- package/dist/spec/llm/client.d.ts.map +1 -1
- package/dist/spec/llm/client.js +143 -81
- package/dist/spec/llm/client.js.map +1 -1
- package/dist/spec/llm/factory.d.ts +41 -0
- package/dist/spec/llm/factory.d.ts.map +1 -0
- package/dist/spec/llm/factory.js +80 -0
- package/dist/spec/llm/factory.js.map +1 -0
- package/dist/spec/llm/prompts.d.ts +24 -8
- package/dist/spec/llm/prompts.d.ts.map +1 -1
- package/dist/spec/llm/prompts.js +112 -62
- package/dist/spec/llm/prompts.js.map +1 -1
- package/dist/spec/llm/retry.d.ts +53 -0
- package/dist/spec/llm/retry.d.ts.map +1 -0
- package/dist/spec/llm/retry.js +153 -0
- package/dist/spec/llm/retry.js.map +1 -0
- package/dist/spec/mine/clustering/features.d.ts +38 -0
- package/dist/spec/mine/clustering/features.d.ts.map +1 -0
- package/dist/spec/mine/clustering/features.js +108 -0
- package/dist/spec/mine/clustering/features.js.map +1 -0
- package/dist/spec/mine/clustering/index.d.ts +62 -0
- package/dist/spec/mine/clustering/index.d.ts.map +1 -0
- package/dist/spec/mine/clustering/index.js +259 -0
- package/dist/spec/mine/clustering/index.js.map +1 -0
- package/dist/spec/mine/clustering/leiden.d.ts +61 -0
- package/dist/spec/mine/clustering/leiden.d.ts.map +1 -0
- package/dist/spec/mine/clustering/leiden.js +489 -0
- package/dist/spec/mine/clustering/leiden.js.map +1 -0
- package/dist/spec/mine/clustering/text-similarity.d.ts +22 -0
- package/dist/spec/mine/clustering/text-similarity.d.ts.map +1 -0
- package/dist/spec/mine/clustering/text-similarity.js +98 -0
- package/dist/spec/mine/clustering/text-similarity.js.map +1 -0
- package/dist/spec/mine/generator.d.ts +54 -0
- package/dist/spec/mine/generator.d.ts.map +1 -0
- package/dist/spec/mine/generator.js +267 -0
- package/dist/spec/mine/generator.js.map +1 -0
- package/dist/spec/mine/persist.d.ts +37 -0
- package/dist/spec/mine/persist.d.ts.map +1 -0
- package/dist/spec/mine/persist.js +170 -0
- package/dist/spec/mine/persist.js.map +1 -0
- package/dist/spec/mine/pipeline.d.ts +41 -0
- package/dist/spec/mine/pipeline.d.ts.map +1 -0
- package/dist/spec/mine/pipeline.js +236 -0
- package/dist/spec/mine/pipeline.js.map +1 -0
- package/dist/spec/mine/scanner.d.ts +59 -0
- package/dist/spec/mine/scanner.d.ts.map +1 -0
- package/dist/spec/mine/scanner.js +383 -0
- package/dist/spec/mine/scanner.js.map +1 -0
- package/dist/spec/types.d.ts +32 -0
- package/dist/spec/types.d.ts.map +1 -1
- package/dist/spec/ui/index.d.ts +9 -0
- package/dist/spec/ui/index.d.ts.map +1 -0
- package/dist/spec/ui/index.js +16 -0
- package/dist/spec/ui/index.js.map +1 -0
- package/dist/spec/ui/progress-handler.d.ts +33 -0
- package/dist/spec/ui/progress-handler.d.ts.map +1 -0
- package/dist/spec/ui/progress-handler.js +132 -0
- package/dist/spec/ui/progress-handler.js.map +1 -0
- package/dist/spec/ui/progress.d.ts +24 -0
- package/dist/spec/ui/progress.d.ts.map +1 -0
- package/dist/spec/ui/progress.js +13 -0
- package/dist/spec/ui/progress.js.map +1 -0
- package/dist/spec/utils/fs.d.ts +45 -0
- package/dist/spec/utils/fs.d.ts.map +1 -0
- package/dist/spec/utils/fs.js +163 -0
- package/dist/spec/utils/fs.js.map +1 -0
- package/dist/spec/utils/index.d.ts +12 -0
- package/dist/spec/utils/index.d.ts.map +1 -0
- package/dist/spec/utils/index.js +26 -0
- package/dist/spec/utils/index.js.map +1 -0
- package/dist/spec/utils/meta.d.ts +32 -0
- package/dist/spec/utils/meta.d.ts.map +1 -0
- package/dist/spec/utils/meta.js +122 -0
- package/dist/spec/utils/meta.js.map +1 -0
- package/dist/spec/utils/truncate.d.ts +86 -0
- package/dist/spec/utils/truncate.d.ts.map +1 -0
- package/dist/spec/utils/truncate.js +172 -0
- package/dist/spec/utils/truncate.js.map +1 -0
- package/dist/sync/watcher.d.ts +25 -1
- package/dist/sync/watcher.d.ts.map +1 -1
- package/dist/sync/watcher.js +76 -3
- package/dist/sync/watcher.js.map +1 -1
- package/dist/telemetry/index.js +3 -3
- package/dist/telemetry/index.js.map +1 -1
- package/dist/types.d.ts +3 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +62 -58
- package/scripts/_tmp-cfwk-resolve.log +0 -0
- package/scripts/_tmp-cfwk-sig.log +0 -0
- package/scripts/_tmp-cfwk-vt.log +0 -0
- package/scripts/add-lang/bench.sh +60 -60
- package/scripts/add-lang/check-grammar.mjs +75 -75
- package/scripts/add-lang/dump-ast.mjs +103 -103
- package/scripts/add-lang/verify-extraction.mjs +70 -70
- package/scripts/agent-eval/ab-adoption.sh +91 -91
- package/scripts/agent-eval/ab-hook.sh +86 -86
- package/scripts/agent-eval/ab-impl.sh +78 -78
- package/scripts/agent-eval/ab-new-vs-baseline.sh +102 -102
- package/scripts/agent-eval/ab-sufficiency.sh +78 -78
- package/scripts/agent-eval/arms-F.sh +21 -21
- package/scripts/agent-eval/arms-matrix.sh +37 -37
- package/scripts/agent-eval/audit.sh +68 -68
- package/scripts/agent-eval/bench-readme.sh +28 -28
- package/scripts/agent-eval/bench-why-repo.sh +22 -22
- package/scripts/agent-eval/block-read-hook.sh +19 -19
- package/scripts/agent-eval/hook-settings.json +15 -15
- package/scripts/agent-eval/itrun.sh +120 -120
- package/scripts/agent-eval/offload-eval-3arm.sh +72 -72
- package/scripts/agent-eval/offload-eval-cost.mjs +133 -133
- package/scripts/agent-eval/offload-eval-effort.mjs +108 -108
- package/scripts/agent-eval/offload-eval-frontload-matrix.sh +25 -25
- package/scripts/agent-eval/offload-eval-frontload.sh +47 -47
- package/scripts/agent-eval/offload-eval-ground-truth.json +18 -18
- package/scripts/agent-eval/offload-eval-hook.mjs +84 -84
- package/scripts/agent-eval/offload-eval-judge.mjs +103 -103
- package/scripts/agent-eval/offload-eval-matrix.sh +20 -20
- package/scripts/agent-eval/offload-eval-metrics.mjs +94 -94
- package/scripts/agent-eval/offload-eval-refs1.sh +50 -50
- package/scripts/agent-eval/offload-eval-setup.sh +24 -24
- package/scripts/agent-eval/offload-eval-styles.sh +71 -71
- package/scripts/agent-eval/offload-eval-summarize.mjs +68 -68
- package/scripts/agent-eval/offload-eval.md +76 -76
- package/scripts/agent-eval/parse-arms.mjs +116 -116
- package/scripts/agent-eval/parse-bench-readme.mjs +84 -84
- package/scripts/agent-eval/parse-run.mjs +45 -45
- package/scripts/agent-eval/parse-session.mjs +93 -93
- package/scripts/agent-eval/probe-context.mjs +21 -21
- package/scripts/agent-eval/probe-explore.mjs +40 -40
- package/scripts/agent-eval/probe-node.mjs +20 -20
- package/scripts/agent-eval/probe-sweep.mjs +119 -119
- package/scripts/agent-eval/probe-trace.mjs +20 -20
- package/scripts/agent-eval/redirect-read-hook.sh +38 -38
- package/scripts/agent-eval/repro-concurrent-explore.mjs +119 -119
- package/scripts/agent-eval/repro-daemon-clients.mjs +125 -125
- package/scripts/agent-eval/run-agent.sh +34 -34
- package/scripts/agent-eval/run-all.sh +75 -75
- package/scripts/agent-eval/run-arms.sh +56 -56
- package/scripts/agent-eval/seq-matrix.mjs +137 -137
- package/scripts/bench-arkts-init-rss.log +0 -0
- package/scripts/build-bundle.sh +123 -123
- package/scripts/exp_boundary_eval/README.md +247 -247
- package/scripts/exp_boundary_eval/__pycache__/_utils.cpython-310.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/_utils.cpython-38.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/analyze.cpython-310.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/analyze.cpython-38.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/deveco_arm.cpython-38.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/run_all.cpython-310.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/run_all.cpython-38.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/run_one.cpython-310.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/run_one.cpython-38.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/run_session.cpython-310.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/run_session.cpython-38.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/setup.cpython-310.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/setup.cpython-38.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/win_mcp_launcher.cpython-38.pyc +0 -0
- package/scripts/exp_boundary_eval/_test_mcp_chain.py +78 -78
- package/scripts/exp_boundary_eval/_test_stdin.py +8 -8
- package/scripts/exp_boundary_eval/_utils.py +1116 -1116
- package/scripts/exp_boundary_eval/analyze.py +1313 -1313
- package/scripts/exp_boundary_eval/deveco_arm.py +519 -519
- package/scripts/exp_boundary_eval/run_all.py +378 -378
- package/scripts/exp_boundary_eval/run_one.py +165 -165
- package/scripts/exp_boundary_eval/run_session.py +158 -158
- package/scripts/exp_boundary_eval/setup.py +120 -120
- package/scripts/exp_boundary_eval/win_mcp_launcher.py +73 -73
- package/scripts/exp_boundary_eval/win_mcp_stdio_wrap.js +36 -36
- package/scripts/exp_boundary_eval/win_node_launcher.py +24 -24
- package/scripts/extract-release-notes.mjs +130 -130
- package/scripts/local-install.sh +41 -41
- package/scripts/npm-sdk.js +75 -75
- package/scripts/npm-shim.js +275 -275
- package/scripts/ohos-sdk-publish.mjs +133 -133
- package/scripts/pack-npm.sh +119 -119
- package/scripts/prepare-release.mjs +270 -270
- package/scripts/probe-arkts-mem-why-run.log +0 -0
- package/scripts/probe-banner-livecard-ir.log +0 -0
- package/scripts/probe-cfwk-ast.stderr.log +0 -0
- package/scripts/probe-cfwk-ast.stdout.log +0 -0
- package/scripts/probe-cfwk-attr-shape.log +0 -0
- package/scripts/probe-cfwk-cfgdump.stderr.log +0 -0
- package/scripts/probe-cfwk-cfgdump.stdout.log +0 -0
- package/scripts/probe-cfwk-cvc.stderr.log +0 -0
- package/scripts/probe-cfwk-cvc.stdout.log +0 -0
- package/scripts/probe-cfwk-diag2.log +0 -0
- package/scripts/probe-cfwk-diag3.log +0 -0
- package/scripts/probe-cfwk-fedbg.stderr.log +0 -0
- package/scripts/probe-cfwk-fedbg.stdout.log +0 -0
- package/scripts/probe-cfwk-fileresult.log +0 -0
- package/scripts/probe-cfwk-fix.stderr.log +0 -0
- package/scripts/probe-cfwk-fix.stdout.log +0 -0
- package/scripts/probe-cfwk-fix2.stderr.log +0 -0
- package/scripts/probe-cfwk-fix2.stdout.log +0 -0
- package/scripts/probe-cfwk-fix3.stderr.log +0 -0
- package/scripts/probe-cfwk-fix3.stdout.log +0 -0
- package/scripts/probe-cfwk-foreach.log +0 -0
- package/scripts/probe-cfwk-getmethod-throw.log +0 -0
- package/scripts/probe-cfwk-hg-extract.log +0 -0
- package/scripts/probe-cfwk-pr1003-noprior.stderr.log +0 -0
- package/scripts/probe-cfwk-pr1003-noprior.stdout.log +0 -0
- package/scripts/probe-cfwk-pr1003.stderr.log +0 -0
- package/scripts/probe-cfwk-pr1003.stdout.log +0 -0
- package/scripts/probe-cfwk-preroot-noprior.stderr.log +0 -0
- package/scripts/probe-cfwk-preroot-noprior.stdout.log +0 -0
- package/scripts/probe-cfwk-preroot-prior.stderr.log +0 -0
- package/scripts/probe-cfwk-preroot-prior.stdout.log +0 -0
- package/scripts/probe-cfwk-preroot-skipstate.stderr.log +0 -0
- package/scripts/probe-cfwk-preroot-skipstate.stdout.log +0 -0
- package/scripts/probe-cfwk-resolve-sim.log +0 -0
- package/scripts/probe-cfwk-tree-shape.log +0 -0
- package/scripts/probe-cfwk-walk-abort.log +0 -0
- package/scripts/probe-cfwk.log +0 -0
- package/scripts/probe-force-index.log +0 -0
- package/scripts/probe-no-force-index.log +0 -0
- package/scripts/probe-samefile-ir.stderr.log +0 -0
- package/scripts/probe-samefile-ir.stdout.log +224 -0
- package/scripts/probe-sdk-vs-project.log +0 -0
- package/scripts/probe-viewtree-downgrade.log +0 -0
- package/dist/arkts/ohos-api-index.d.ts +0 -15
- package/dist/arkts/ohos-api-index.d.ts.map +0 -1
- package/dist/arkts/ohos-api-index.js +0 -190
- package/dist/arkts/ohos-api-index.js.map +0 -1
- package/dist/arkts/ohos-sdk-input.d.ts +0 -36
- package/dist/arkts/ohos-sdk-input.d.ts.map +0 -1
- package/dist/arkts/ohos-sdk-input.js +0 -214
- package/dist/arkts/ohos-sdk-input.js.map +0 -1
- package/dist/extraction/languages/arkts-state-decorators.d.ts +0 -13
- package/dist/extraction/languages/arkts-state-decorators.d.ts.map +0 -1
- package/dist/extraction/languages/arkts-state-decorators.js +0 -26
- package/dist/extraction/languages/arkts-state-decorators.js.map +0 -1
- package/dist/extraction/languages/ohos-api-consumer.d.ts +0 -34
- package/dist/extraction/languages/ohos-api-consumer.d.ts.map +0 -1
- package/dist/extraction/languages/ohos-api-consumer.js +0 -283
- package/dist/extraction/languages/ohos-api-consumer.js.map +0 -1
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Resolve HarmonyOS command-line-tools archives/directories and API db versions.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.OhosSdkInputError = void 0;
|
|
40
|
-
exports.parseOhosToolsVersionFromName = parseOhosToolsVersionFromName;
|
|
41
|
-
exports.isArchivePath = isArchivePath;
|
|
42
|
-
exports.findOhosSdkHome = findOhosSdkHome;
|
|
43
|
-
exports.hasOpenHarmonyEts = hasOpenHarmonyEts;
|
|
44
|
-
exports.listOhosApiEtsRoots = listOhosApiEtsRoots;
|
|
45
|
-
exports.resolveOhosSdkInput = resolveOhosSdkInput;
|
|
46
|
-
exports.ohosApiDbFilename = ohosApiDbFilename;
|
|
47
|
-
exports.ohosApiDbInstallPath = ohosApiDbInstallPath;
|
|
48
|
-
const fs = __importStar(require("fs"));
|
|
49
|
-
const os = __importStar(require("os"));
|
|
50
|
-
const path = __importStar(require("path"));
|
|
51
|
-
const child_process_1 = require("child_process");
|
|
52
|
-
const ARCHIVE_EXTENSIONS = ['.tar.gz', '.tgz', '.zip', '.tar'];
|
|
53
|
-
class OhosSdkInputError extends Error {
|
|
54
|
-
constructor(message) {
|
|
55
|
-
super(message);
|
|
56
|
-
this.name = 'OhosSdkInputError';
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
exports.OhosSdkInputError = OhosSdkInputError;
|
|
60
|
-
/** Parse `6.1.1.290` or `commandline-tools-linux-x64-6.1.1.290.zip` → `6.1.1`. */
|
|
61
|
-
function parseOhosToolsVersionFromName(name) {
|
|
62
|
-
const base = path.basename(name);
|
|
63
|
-
const withoutExt = stripArchiveExtension(base);
|
|
64
|
-
const match = withoutExt.match(/(\d+\.\d+\.\d+)(?:\.\d+)?$/);
|
|
65
|
-
return match?.[1] ?? null;
|
|
66
|
-
}
|
|
67
|
-
function stripArchiveExtension(filename) {
|
|
68
|
-
for (const ext of ARCHIVE_EXTENSIONS) {
|
|
69
|
-
if (filename.toLowerCase().endsWith(ext)) {
|
|
70
|
-
return filename.slice(0, -ext.length);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
return filename;
|
|
74
|
-
}
|
|
75
|
-
function isArchivePath(inputPath) {
|
|
76
|
-
const lower = inputPath.toLowerCase();
|
|
77
|
-
return ARCHIVE_EXTENSIONS.some((ext) => lower.endsWith(ext));
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Locate `sdk/default` that contains `openharmony/ets` under an extracted tree.
|
|
81
|
-
*/
|
|
82
|
-
function findOhosSdkHome(searchRoot) {
|
|
83
|
-
const resolved = path.resolve(searchRoot);
|
|
84
|
-
const direct = [
|
|
85
|
-
path.join(resolved, 'sdk', 'default'),
|
|
86
|
-
path.join(resolved, 'command-line-tools', 'sdk', 'default'),
|
|
87
|
-
];
|
|
88
|
-
for (const candidate of direct) {
|
|
89
|
-
if (hasOpenHarmonyEts(candidate)) {
|
|
90
|
-
return candidate;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
const queue = [{ dir: resolved, depth: 0 }];
|
|
94
|
-
const seen = new Set();
|
|
95
|
-
while (queue.length > 0) {
|
|
96
|
-
const { dir, depth } = queue.shift();
|
|
97
|
-
if (seen.has(dir) || depth > 5)
|
|
98
|
-
continue;
|
|
99
|
-
seen.add(dir);
|
|
100
|
-
const sdkDefault = path.join(dir, 'sdk', 'default');
|
|
101
|
-
if (hasOpenHarmonyEts(sdkDefault)) {
|
|
102
|
-
return sdkDefault;
|
|
103
|
-
}
|
|
104
|
-
if (depth >= 5)
|
|
105
|
-
continue;
|
|
106
|
-
let entries;
|
|
107
|
-
try {
|
|
108
|
-
entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
109
|
-
}
|
|
110
|
-
catch {
|
|
111
|
-
continue;
|
|
112
|
-
}
|
|
113
|
-
for (const entry of entries) {
|
|
114
|
-
if (!entry.isDirectory())
|
|
115
|
-
continue;
|
|
116
|
-
if (entry.name === 'node_modules' || entry.name === '.git')
|
|
117
|
-
continue;
|
|
118
|
-
queue.push({ dir: path.join(dir, entry.name), depth: depth + 1 });
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
return null;
|
|
122
|
-
}
|
|
123
|
-
function hasOpenHarmonyEts(sdkHome) {
|
|
124
|
-
return fs.existsSync(path.join(sdkHome, 'openharmony', 'ets'));
|
|
125
|
-
}
|
|
126
|
-
function listOhosApiEtsRoots(sdkHome) {
|
|
127
|
-
const roots = [];
|
|
128
|
-
const openharmony = path.join(sdkHome, 'openharmony', 'ets');
|
|
129
|
-
if (fs.existsSync(openharmony)) {
|
|
130
|
-
roots.push(openharmony);
|
|
131
|
-
}
|
|
132
|
-
const hms = path.join(sdkHome, 'hms', 'ets');
|
|
133
|
-
if (fs.existsSync(hms)) {
|
|
134
|
-
roots.push(hms);
|
|
135
|
-
}
|
|
136
|
-
return roots;
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Resolve a command-line-tools archive or directory to an SDK home + API db version.
|
|
140
|
-
*/
|
|
141
|
-
function resolveOhosSdkInput(options) {
|
|
142
|
-
const inputPath = path.resolve(options.inputPath);
|
|
143
|
-
if (!fs.existsSync(inputPath)) {
|
|
144
|
-
throw new OhosSdkInputError(`Path does not exist: ${inputPath}`);
|
|
145
|
-
}
|
|
146
|
-
let searchRoot = inputPath;
|
|
147
|
-
let cleanup;
|
|
148
|
-
if (fs.statSync(inputPath).isFile()) {
|
|
149
|
-
if (!isArchivePath(inputPath)) {
|
|
150
|
-
throw new OhosSdkInputError(`Unsupported file type: ${path.basename(inputPath)} (expected .zip, .tar.gz, .tgz, or .tar)`);
|
|
151
|
-
}
|
|
152
|
-
const extracted = extractArchive(inputPath);
|
|
153
|
-
searchRoot = extracted.dir;
|
|
154
|
-
cleanup = extracted.cleanup;
|
|
155
|
-
}
|
|
156
|
-
const sdkHome = findOhosSdkHome(searchRoot);
|
|
157
|
-
if (!sdkHome) {
|
|
158
|
-
cleanup?.();
|
|
159
|
-
throw new OhosSdkInputError(`Could not find sdk/default/openharmony/ets under ${inputPath}. ` +
|
|
160
|
-
'Expected HarmonyOS command-line-tools layout.');
|
|
161
|
-
}
|
|
162
|
-
const version = options.versionOverride?.trim() ||
|
|
163
|
-
parseOhosToolsVersionFromName(inputPath) ||
|
|
164
|
-
parseOhosToolsVersionFromName(searchRoot);
|
|
165
|
-
if (!version) {
|
|
166
|
-
cleanup?.();
|
|
167
|
-
throw new OhosSdkInputError('Could not determine API db version. Use a path like commandline-tools-linux-x64-6.1.1.290.zip ' +
|
|
168
|
-
'or pass the version as the second argument.');
|
|
169
|
-
}
|
|
170
|
-
return {
|
|
171
|
-
sdkHome,
|
|
172
|
-
version,
|
|
173
|
-
sourcePath: inputPath,
|
|
174
|
-
cleanup,
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
function extractArchive(archivePath) {
|
|
178
|
-
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'homegraph-ohos-sdk-'));
|
|
179
|
-
const lower = archivePath.toLowerCase();
|
|
180
|
-
try {
|
|
181
|
-
if (lower.endsWith('.zip')) {
|
|
182
|
-
(0, child_process_1.execFileSync)('unzip', ['-q', archivePath, '-d', tempDir], { stdio: 'pipe' });
|
|
183
|
-
}
|
|
184
|
-
else if (lower.endsWith('.tar.gz') || lower.endsWith('.tgz')) {
|
|
185
|
-
(0, child_process_1.execFileSync)('tar', ['-xzf', archivePath, '-C', tempDir], { stdio: 'pipe' });
|
|
186
|
-
}
|
|
187
|
-
else if (lower.endsWith('.tar')) {
|
|
188
|
-
(0, child_process_1.execFileSync)('tar', ['-xf', archivePath, '-C', tempDir], { stdio: 'pipe' });
|
|
189
|
-
}
|
|
190
|
-
else {
|
|
191
|
-
throw new OhosSdkInputError(`Unsupported archive: ${path.basename(archivePath)}`);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
catch (err) {
|
|
195
|
-
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
196
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
197
|
-
throw new OhosSdkInputError(`Failed to extract ${archivePath}: ${msg}`);
|
|
198
|
-
}
|
|
199
|
-
return {
|
|
200
|
-
dir: tempDir,
|
|
201
|
-
cleanup: () => {
|
|
202
|
-
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
203
|
-
},
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
/** Default filename for a versioned OHOS API db. */
|
|
207
|
-
function ohosApiDbFilename(version) {
|
|
208
|
-
return `ohos-api-${version}.db`;
|
|
209
|
-
}
|
|
210
|
-
/** Target path under ~/.homegraph/api/ for a versioned db. */
|
|
211
|
-
function ohosApiDbInstallPath(version) {
|
|
212
|
-
return path.join(os.homedir(), '.homegraph', 'api', ohosApiDbFilename(version));
|
|
213
|
-
}
|
|
214
|
-
//# sourceMappingURL=ohos-sdk-input.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ohos-sdk-input.js","sourceRoot":"","sources":["../../src/arkts/ohos-sdk-input.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBH,sEAKC;AAWD,sCAGC;AAKD,0CAuCC;AAED,8CAEC;AAED,kDAWC;AAmBD,kDAgDC;AA+BD,8CAEC;AAGD,oDAEC;AAxMD,uCAAyB;AACzB,uCAAyB;AACzB,2CAA6B;AAC7B,iDAA6C;AAE7C,MAAM,kBAAkB,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAU,CAAC;AAExE,MAAa,iBAAkB,SAAQ,KAAK;IAC1C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AALD,8CAKC;AAED,kFAAkF;AAClF,SAAgB,6BAA6B,CAAC,IAAY;IACxD,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjC,MAAM,UAAU,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAC7D,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;AAC5B,CAAC;AAED,SAAS,qBAAqB,CAAC,QAAgB;IAC7C,KAAK,MAAM,GAAG,IAAI,kBAAkB,EAAE,CAAC;QACrC,IAAI,QAAQ,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACz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CAAC;QAC9E,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,iBAAiB,CAAC,wBAAwB,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QACpF,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACrD,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC7D,MAAM,IAAI,iBAAiB,CAAC,qBAAqB,WAAW,KAAK,GAAG,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED,OAAO;QACL,GAAG,EAAE,OAAO;QACZ,OAAO,EAAE,GAAG,EAAE;YACZ,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACvD,CAAC;KACF,CAAC;AACJ,CAAC;AAED,oDAAoD;AACpD,SAAgB,iBAAiB,CAAC,OAAe;IAC/C,OAAO,YAAY,OAAO,KAAK,CAAC;AAClC,CAAC;AAED,8DAA8D;AAC9D,SAAgB,oBAAoB,CAAC,OAAe;IAClD,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;AAClF,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ArkUI state decorator helpers — sourced from arkanalyzer only
|
|
3
|
-
* ({@link ArkField.getStateDecorators} / ViewTree stateValuesTransfer).
|
|
4
|
-
*/
|
|
5
|
-
import type { ArkField } from 'arkanalyzer';
|
|
6
|
-
/** Parent→child state transfer edge vias — match ArkTS decorator names. */
|
|
7
|
-
export type StateTransferVia = 'Prop' | 'Link';
|
|
8
|
-
/** State decorator kinds on a field (@State, @Prop, @Link, …). */
|
|
9
|
-
export declare function stateDecoratorKinds(field: ArkField): string[];
|
|
10
|
-
/** Child field's @Prop / @Link — used as the edge `via` (same name as the decorator). */
|
|
11
|
-
export declare function stateTransferViaForField(field: ArkField): StateTransferVia | null;
|
|
12
|
-
export declare function transferDirectionForVia(via: StateTransferVia): 'one-way' | 'two-way';
|
|
13
|
-
//# sourceMappingURL=arkts-state-decorators.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"arkts-state-decorators.d.ts","sourceRoot":"","sources":["../../../src/extraction/languages/arkts-state-decorators.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,2EAA2E;AAC3E,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,CAAC;AAI/C,kEAAkE;AAClE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,EAAE,CAI7D;AAED,yFAAyF;AACzF,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,QAAQ,GAAG,gBAAgB,GAAG,IAAI,CAOjF;AAED,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,gBAAgB,GAAG,SAAS,GAAG,SAAS,CAEpF"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.stateDecoratorKinds = stateDecoratorKinds;
|
|
4
|
-
exports.stateTransferViaForField = stateTransferViaForField;
|
|
5
|
-
exports.transferDirectionForVia = transferDirectionForVia;
|
|
6
|
-
const PROP_TRANSFER_DECORATORS = new Set(['Prop', 'Link']);
|
|
7
|
-
/** State decorator kinds on a field (@State, @Prop, @Link, …). */
|
|
8
|
-
function stateDecoratorKinds(field) {
|
|
9
|
-
const decs = field.getStateDecorators?.();
|
|
10
|
-
if (!decs)
|
|
11
|
-
return [];
|
|
12
|
-
return [...decs].map((d) => d.getKind()).filter(Boolean);
|
|
13
|
-
}
|
|
14
|
-
/** Child field's @Prop / @Link — used as the edge `via` (same name as the decorator). */
|
|
15
|
-
function stateTransferViaForField(field) {
|
|
16
|
-
for (const kind of stateDecoratorKinds(field)) {
|
|
17
|
-
if (PROP_TRANSFER_DECORATORS.has(kind)) {
|
|
18
|
-
return kind;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
function transferDirectionForVia(via) {
|
|
24
|
-
return via === 'Link' ? 'two-way' : 'one-way';
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=arkts-state-decorators.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"arkts-state-decorators.js","sourceRoot":"","sources":["../../../src/extraction/languages/arkts-state-decorators.ts"],"names":[],"mappings":";;AAYA,kDAIC;AAGD,4DAOC;AAED,0DAEC;AArBD,MAAM,wBAAwB,GAAG,IAAI,GAAG,CAAmB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAE7E,kEAAkE;AAClE,SAAgB,mBAAmB,CAAC,KAAe;IACjD,MAAM,IAAI,GAAG,KAAK,CAAC,kBAAkB,EAAE,EAAE,CAAC;IAC1C,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAC3D,CAAC;AAED,yFAAyF;AACzF,SAAgB,wBAAwB,CAAC,KAAe;IACtD,KAAK,MAAM,IAAI,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9C,IAAI,wBAAwB,CAAC,GAAG,CAAC,IAAwB,CAAC,EAAE,CAAC;YAC3D,OAAO,IAAwB,CAAC;QAClC,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAgB,uBAAuB,CAAC,GAAqB;IAC3D,OAAO,GAAG,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;AAChD,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Consumer-side OHOS API db: detect compileSdkVersion, ensure npm package, ATTACH for queries.
|
|
3
|
-
*/
|
|
4
|
-
import type { QueryBuilder } from '../../db/queries';
|
|
5
|
-
export declare const OHOS_API_FILE_PREFIX = "ohos-sdk:";
|
|
6
|
-
export declare const OHOS_API_VERSION_META = "ohos_api_version";
|
|
7
|
-
export declare const OHOS_API_DB_PATH_META = "ohos_api_db_path";
|
|
8
|
-
export interface OhosApiDbBinding {
|
|
9
|
-
version: string;
|
|
10
|
-
dbPath: string;
|
|
11
|
-
packageName: string;
|
|
12
|
-
installed: boolean;
|
|
13
|
-
}
|
|
14
|
-
export interface OhosApiDbBindingWarning {
|
|
15
|
-
message: string;
|
|
16
|
-
code: 'ohos_api_version_unknown' | 'ohos_api_install_failed' | 'ohos_api_db_missing';
|
|
17
|
-
}
|
|
18
|
-
/** Prefix applied to API db node file paths so explore can render without disk reads. */
|
|
19
|
-
export declare function markOhosApiFilePath(relativePath: string): string;
|
|
20
|
-
export declare function isOhosApiFilePath(filePath: string): boolean;
|
|
21
|
-
/** Strip json5 comments/trailing commas enough for compileSdkVersion extraction. */
|
|
22
|
-
export declare function parseJson5Minimal(text: string): unknown;
|
|
23
|
-
/** Normalize compileSdkVersion values like "6.0.1(21)" → "6.0.1". */
|
|
24
|
-
export declare function normalizeOhosApiVersion(raw: unknown): string | null;
|
|
25
|
-
/** Read compileSdkVersion from build-profile.json5 (root or module). */
|
|
26
|
-
export declare function detectOhosCompileSdkVersion(projectRoot: string): string | null;
|
|
27
|
-
export declare function isOhosArktsProject(projectRoot: string, languages?: string[]): boolean;
|
|
28
|
-
/** Install npm package if local db is missing; non-throwing on failure. */
|
|
29
|
-
export declare function ensureOhosApiDb(version: string): OhosApiDbBinding | OhosApiDbBindingWarning;
|
|
30
|
-
/** Detect version, ensure db, persist metadata, ATTACH — never throws. */
|
|
31
|
-
export declare function bindOhosApiDbForProject(projectRoot: string, queries: QueryBuilder, languages?: string[]): OhosApiDbBinding | OhosApiDbBindingWarning | null;
|
|
32
|
-
/** Re-ATTACH from project metadata after reopen / new QueryBuilder. */
|
|
33
|
-
export declare function restoreOhosApiDbAttach(queries: QueryBuilder): OhosApiDbBinding | null;
|
|
34
|
-
//# sourceMappingURL=ohos-api-consumer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ohos-api-consumer.d.ts","sourceRoot":"","sources":["../../../src/extraction/languages/ohos-api-consumer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOrD,eAAO,MAAM,oBAAoB,cAAc,CAAC;AAChD,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AACxD,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AAExD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,0BAA0B,GAAG,yBAAyB,GAAG,qBAAqB,CAAC;CACtF;AAED,yFAAyF;AACzF,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED,oFAAoF;AACpF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAMvD;AAED,qEAAqE;AACrE,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAcnE;AAgDD,wEAAwE;AACxE,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAmB9E;AAED,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAIrF;AAqBD,2EAA2E;AAC3E,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,GAAG,uBAAuB,CA0C3F;AAED,0EAA0E;AAC1E,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,YAAY,EACrB,SAAS,CAAC,EAAE,MAAM,EAAE,GACnB,gBAAgB,GAAG,uBAAuB,GAAG,IAAI,CA6BnD;AAED,uEAAuE;AACvE,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,YAAY,GAAG,gBAAgB,GAAG,IAAI,CAerF"}
|
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Consumer-side OHOS API db: detect compileSdkVersion, ensure npm package, ATTACH for queries.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.OHOS_API_DB_PATH_META = exports.OHOS_API_VERSION_META = exports.OHOS_API_FILE_PREFIX = void 0;
|
|
40
|
-
exports.markOhosApiFilePath = markOhosApiFilePath;
|
|
41
|
-
exports.isOhosApiFilePath = isOhosApiFilePath;
|
|
42
|
-
exports.parseJson5Minimal = parseJson5Minimal;
|
|
43
|
-
exports.normalizeOhosApiVersion = normalizeOhosApiVersion;
|
|
44
|
-
exports.detectOhosCompileSdkVersion = detectOhosCompileSdkVersion;
|
|
45
|
-
exports.isOhosArktsProject = isOhosArktsProject;
|
|
46
|
-
exports.ensureOhosApiDb = ensureOhosApiDb;
|
|
47
|
-
exports.bindOhosApiDbForProject = bindOhosApiDbForProject;
|
|
48
|
-
exports.restoreOhosApiDbAttach = restoreOhosApiDbAttach;
|
|
49
|
-
const fs = __importStar(require("fs"));
|
|
50
|
-
const os = __importStar(require("os"));
|
|
51
|
-
const path = __importStar(require("path"));
|
|
52
|
-
const child_process_1 = require("child_process");
|
|
53
|
-
const arkts_1 = require("./arkts");
|
|
54
|
-
exports.OHOS_API_FILE_PREFIX = 'ohos-sdk:';
|
|
55
|
-
exports.OHOS_API_VERSION_META = 'ohos_api_version';
|
|
56
|
-
exports.OHOS_API_DB_PATH_META = 'ohos_api_db_path';
|
|
57
|
-
/** Prefix applied to API db node file paths so explore can render without disk reads. */
|
|
58
|
-
function markOhosApiFilePath(relativePath) {
|
|
59
|
-
return `${exports.OHOS_API_FILE_PREFIX}${relativePath.replace(/\\/g, '/')}`;
|
|
60
|
-
}
|
|
61
|
-
function isOhosApiFilePath(filePath) {
|
|
62
|
-
return filePath.startsWith(exports.OHOS_API_FILE_PREFIX);
|
|
63
|
-
}
|
|
64
|
-
/** Strip json5 comments/trailing commas enough for compileSdkVersion extraction. */
|
|
65
|
-
function parseJson5Minimal(text) {
|
|
66
|
-
const stripped = text
|
|
67
|
-
.replace(/\/\/.*$/gm, '')
|
|
68
|
-
.replace(/\/\*[\s\S]*?\*\//g, '')
|
|
69
|
-
.replace(/,(\s*[}\]])/g, '$1');
|
|
70
|
-
return JSON.parse(stripped);
|
|
71
|
-
}
|
|
72
|
-
/** Normalize compileSdkVersion values like "6.0.1(21)" → "6.0.1". */
|
|
73
|
-
function normalizeOhosApiVersion(raw) {
|
|
74
|
-
if (raw == null)
|
|
75
|
-
return null;
|
|
76
|
-
if (typeof raw === 'number') {
|
|
77
|
-
const s = String(raw);
|
|
78
|
-
if (/^\d+$/.test(s) && s.length >= 8) {
|
|
79
|
-
const major = Math.floor(Number(s) / 1_000_000);
|
|
80
|
-
const minor = Math.floor((Number(s) % 1_000_000) / 1000);
|
|
81
|
-
const patch = Number(s) % 1000;
|
|
82
|
-
return `${major}.${minor}.${patch}`;
|
|
83
|
-
}
|
|
84
|
-
return null;
|
|
85
|
-
}
|
|
86
|
-
const match = String(raw).match(/(\d+\.\d+\.\d+)/);
|
|
87
|
-
return match?.[1] ?? null;
|
|
88
|
-
}
|
|
89
|
-
function findBuildProfileFiles(projectRoot) {
|
|
90
|
-
const found = [];
|
|
91
|
-
const rootProfile = path.join(projectRoot, 'build-profile.json5');
|
|
92
|
-
if (fs.existsSync(rootProfile))
|
|
93
|
-
found.push(rootProfile);
|
|
94
|
-
let entries;
|
|
95
|
-
try {
|
|
96
|
-
entries = fs.readdirSync(projectRoot, { withFileTypes: true });
|
|
97
|
-
}
|
|
98
|
-
catch {
|
|
99
|
-
return found;
|
|
100
|
-
}
|
|
101
|
-
for (const entry of entries) {
|
|
102
|
-
if (!entry.isDirectory())
|
|
103
|
-
continue;
|
|
104
|
-
if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === '.homegraph')
|
|
105
|
-
continue;
|
|
106
|
-
const nested = path.join(projectRoot, entry.name, 'build-profile.json5');
|
|
107
|
-
if (fs.existsSync(nested))
|
|
108
|
-
found.push(nested);
|
|
109
|
-
}
|
|
110
|
-
return found;
|
|
111
|
-
}
|
|
112
|
-
function extractCompileSdkFromObject(obj) {
|
|
113
|
-
if (!obj || typeof obj !== 'object')
|
|
114
|
-
return null;
|
|
115
|
-
const record = obj;
|
|
116
|
-
for (const key of ['compileSdkVersion', 'compileSdk', 'targetSdkVersion']) {
|
|
117
|
-
const v = normalizeOhosApiVersion(record[key]);
|
|
118
|
-
if (v)
|
|
119
|
-
return v;
|
|
120
|
-
}
|
|
121
|
-
const app = record.app;
|
|
122
|
-
if (app && typeof app === 'object') {
|
|
123
|
-
const products = app.products;
|
|
124
|
-
if (Array.isArray(products)) {
|
|
125
|
-
for (const product of products) {
|
|
126
|
-
const v = extractCompileSdkFromObject(product);
|
|
127
|
-
if (v)
|
|
128
|
-
return v;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
for (const value of Object.values(record)) {
|
|
133
|
-
if (value && typeof value === 'object') {
|
|
134
|
-
const v = extractCompileSdkFromObject(value);
|
|
135
|
-
if (v)
|
|
136
|
-
return v;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
return null;
|
|
140
|
-
}
|
|
141
|
-
/** Read compileSdkVersion from build-profile.json5 (root or module). */
|
|
142
|
-
function detectOhosCompileSdkVersion(projectRoot) {
|
|
143
|
-
const envOverride = process.env.HOMEGRAPH_OHOS_API_VERSION?.trim();
|
|
144
|
-
if (envOverride) {
|
|
145
|
-
return normalizeOhosApiVersion(envOverride) ?? envOverride;
|
|
146
|
-
}
|
|
147
|
-
for (const profilePath of findBuildProfileFiles(projectRoot)) {
|
|
148
|
-
try {
|
|
149
|
-
const text = fs.readFileSync(profilePath, 'utf-8');
|
|
150
|
-
const parsed = parseJson5Minimal(text);
|
|
151
|
-
const version = extractCompileSdkFromObject(parsed);
|
|
152
|
-
if (version)
|
|
153
|
-
return version;
|
|
154
|
-
}
|
|
155
|
-
catch {
|
|
156
|
-
const match = fs.readFileSync(profilePath, 'utf-8').match(/compileSdkVersion\s*:\s*['"]?([^'"\s,)]+)/);
|
|
157
|
-
const v = normalizeOhosApiVersion(match?.[1]);
|
|
158
|
-
if (v)
|
|
159
|
-
return v;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
return null;
|
|
163
|
-
}
|
|
164
|
-
function isOhosArktsProject(projectRoot, languages) {
|
|
165
|
-
if (languages?.includes('arkts'))
|
|
166
|
-
return true;
|
|
167
|
-
if (findBuildProfileFiles(projectRoot).length > 0)
|
|
168
|
-
return true;
|
|
169
|
-
return hasEtsUnder(projectRoot, 0);
|
|
170
|
-
}
|
|
171
|
-
function hasEtsUnder(dir, depth) {
|
|
172
|
-
if (depth > 4)
|
|
173
|
-
return false;
|
|
174
|
-
let entries;
|
|
175
|
-
try {
|
|
176
|
-
entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
177
|
-
}
|
|
178
|
-
catch {
|
|
179
|
-
return false;
|
|
180
|
-
}
|
|
181
|
-
for (const entry of entries) {
|
|
182
|
-
const full = path.join(dir, entry.name);
|
|
183
|
-
if (entry.isFile() && entry.name.endsWith('.ets'))
|
|
184
|
-
return true;
|
|
185
|
-
if (entry.isDirectory()) {
|
|
186
|
-
if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === '.homegraph')
|
|
187
|
-
continue;
|
|
188
|
-
if (hasEtsUnder(full, depth + 1))
|
|
189
|
-
return true;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
return false;
|
|
193
|
-
}
|
|
194
|
-
/** Install npm package if local db is missing; non-throwing on failure. */
|
|
195
|
-
function ensureOhosApiDb(version) {
|
|
196
|
-
const dbPath = (0, arkts_1.ohosApiDbInstallPath)(version);
|
|
197
|
-
if (fs.existsSync(dbPath)) {
|
|
198
|
-
return {
|
|
199
|
-
version,
|
|
200
|
-
dbPath,
|
|
201
|
-
packageName: (0, arkts_1.ohosApiDbPackageName)(version),
|
|
202
|
-
installed: false,
|
|
203
|
-
};
|
|
204
|
-
}
|
|
205
|
-
const packageName = (0, arkts_1.ohosApiDbPackageName)(version);
|
|
206
|
-
const installDir = fs.mkdtempSync(path.join(os.tmpdir(), 'hg-ohos-npm-'));
|
|
207
|
-
try {
|
|
208
|
-
(0, child_process_1.execFileSync)('npm', ['install', '--no-save', packageName], {
|
|
209
|
-
cwd: installDir,
|
|
210
|
-
stdio: 'pipe',
|
|
211
|
-
timeout: 180_000,
|
|
212
|
-
env: { ...process.env, npm_config_loglevel: 'error' },
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
catch (err) {
|
|
216
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
217
|
-
return {
|
|
218
|
-
code: 'ohos_api_install_failed',
|
|
219
|
-
message: `Could not fetch ${packageName} (${msg}). ` +
|
|
220
|
-
'Explore will use project code only until the matching API db is available.',
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
finally {
|
|
224
|
-
fs.rmSync(installDir, { recursive: true, force: true });
|
|
225
|
-
}
|
|
226
|
-
if (!fs.existsSync(dbPath)) {
|
|
227
|
-
return {
|
|
228
|
-
code: 'ohos_api_db_missing',
|
|
229
|
-
message: `${packageName} was fetched but ${(0, arkts_1.ohosApiDbFilename)(version)} is missing under ~/.homegraph/api/. ` +
|
|
230
|
-
'Explore will use project code only.',
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
return { version, dbPath, packageName, installed: true };
|
|
234
|
-
}
|
|
235
|
-
/** Detect version, ensure db, persist metadata, ATTACH — never throws. */
|
|
236
|
-
function bindOhosApiDbForProject(projectRoot, queries, languages) {
|
|
237
|
-
if (!isOhosArktsProject(projectRoot, languages))
|
|
238
|
-
return null;
|
|
239
|
-
const version = detectOhosCompileSdkVersion(projectRoot);
|
|
240
|
-
if (!version) {
|
|
241
|
-
return {
|
|
242
|
-
code: 'ohos_api_version_unknown',
|
|
243
|
-
message: 'HarmonyOS project detected but compileSdkVersion not found in build-profile.json5. ' +
|
|
244
|
-
'SDK API lookup disabled; project indexing continues normally.',
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
const ensured = ensureOhosApiDb(version);
|
|
248
|
-
if ('code' in ensured)
|
|
249
|
-
return ensured;
|
|
250
|
-
try {
|
|
251
|
-
queries.attachOhosApiDb(ensured.dbPath);
|
|
252
|
-
queries.setMetadata(exports.OHOS_API_VERSION_META, ensured.version);
|
|
253
|
-
queries.setMetadata(exports.OHOS_API_DB_PATH_META, ensured.dbPath);
|
|
254
|
-
}
|
|
255
|
-
catch (err) {
|
|
256
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
257
|
-
return {
|
|
258
|
-
code: 'ohos_api_db_missing',
|
|
259
|
-
message: `Failed to attach OHOS API db at ${ensured.dbPath}: ${msg}`,
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
return ensured;
|
|
263
|
-
}
|
|
264
|
-
/** Re-ATTACH from project metadata after reopen / new QueryBuilder. */
|
|
265
|
-
function restoreOhosApiDbAttach(queries) {
|
|
266
|
-
const dbPath = queries.getMetadata(exports.OHOS_API_DB_PATH_META);
|
|
267
|
-
const version = queries.getMetadata(exports.OHOS_API_VERSION_META);
|
|
268
|
-
if (!dbPath || !version || !fs.existsSync(dbPath))
|
|
269
|
-
return null;
|
|
270
|
-
try {
|
|
271
|
-
queries.attachOhosApiDb(dbPath);
|
|
272
|
-
return {
|
|
273
|
-
version,
|
|
274
|
-
dbPath,
|
|
275
|
-
packageName: (0, arkts_1.ohosApiDbPackageName)(version),
|
|
276
|
-
installed: false,
|
|
277
|
-
};
|
|
278
|
-
}
|
|
279
|
-
catch {
|
|
280
|
-
return null;
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
//# sourceMappingURL=ohos-api-consumer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ohos-api-consumer.js","sourceRoot":"","sources":["../../../src/extraction/languages/ohos-api-consumer.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BH,kDAEC;AAED,8CAEC;AAGD,8CAMC;AAGD,0DAcC;AAiDD,kEAmBC;AAED,gDAIC;AAsBD,0CA0CC;AAGD,0DAiCC;AAGD,wDAeC;AA5PD,uCAAyB;AACzB,uCAAyB;AACzB,2CAA6B;AAC7B,iDAA6C;AAE7C,mCAIiB;AAEJ,QAAA,oBAAoB,GAAG,WAAW,CAAC;AACnC,QAAA,qBAAqB,GAAG,kBAAkB,CAAC;AAC3C,QAAA,qBAAqB,GAAG,kBAAkB,CAAC;AAcxD,yFAAyF;AACzF,SAAgB,mBAAmB,CAAC,YAAoB;IACtD,OAAO,GAAG,4BAAoB,GAAG,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC;AACtE,CAAC;AAED,SAAgB,iBAAiB,CAAC,QAAgB;IAChD,OAAO,QAAQ,CAAC,UAAU,CAAC,4BAAoB,CAAC,CAAC;AACnD,CAAC;AAED,oFAAoF;AACpF,SAAgB,iBAAiB,CAA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