@ryanstark24/sfgraph-core 1.2.0 → 1.6.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/dist/analyze/apex-platform.d.ts +23 -0
- package/dist/analyze/apex-platform.d.ts.map +1 -0
- package/dist/analyze/apex-platform.js +112 -0
- package/dist/analyze/apex-platform.js.map +1 -0
- package/dist/analyze/audit-graph.d.ts +51 -3
- package/dist/analyze/audit-graph.d.ts.map +1 -1
- package/dist/analyze/audit-graph.js +382 -14
- package/dist/analyze/audit-graph.js.map +1 -1
- package/dist/analyze/component-scope.d.ts +82 -0
- package/dist/analyze/component-scope.d.ts.map +1 -0
- package/dist/analyze/component-scope.js +207 -0
- package/dist/analyze/component-scope.js.map +1 -0
- package/dist/analyze/containment.d.ts +91 -0
- package/dist/analyze/containment.d.ts.map +1 -0
- package/dist/analyze/containment.js +175 -0
- package/dist/analyze/containment.js.map +1 -0
- package/dist/analyze/cross-org.d.ts +35 -0
- package/dist/analyze/cross-org.d.ts.map +1 -1
- package/dist/analyze/cross-org.js +102 -3
- package/dist/analyze/cross-org.js.map +1 -1
- package/dist/analyze/dead-code.d.ts +99 -3
- package/dist/analyze/dead-code.d.ts.map +1 -1
- package/dist/analyze/dead-code.js +282 -10
- package/dist/analyze/dead-code.js.map +1 -1
- package/dist/analyze/dependencies.d.ts +21 -2
- package/dist/analyze/dependencies.d.ts.map +1 -1
- package/dist/analyze/dependencies.js +102 -12
- package/dist/analyze/dependencies.js.map +1 -1
- package/dist/analyze/dependents.d.ts +116 -1
- package/dist/analyze/dependents.d.ts.map +1 -1
- package/dist/analyze/dependents.js +285 -13
- package/dist/analyze/dependents.js.map +1 -1
- package/dist/analyze/deployment-manifest/generate.d.ts +24 -0
- package/dist/analyze/deployment-manifest/generate.d.ts.map +1 -1
- package/dist/analyze/deployment-manifest/generate.js +40 -12
- package/dist/analyze/deployment-manifest/generate.js.map +1 -1
- package/dist/analyze/deployment-manifest/member-name-formatters.d.ts.map +1 -1
- package/dist/analyze/deployment-manifest/member-name-formatters.js +1 -0
- package/dist/analyze/deployment-manifest/member-name-formatters.js.map +1 -1
- package/dist/analyze/deployment-manifest/member-types.d.ts.map +1 -1
- package/dist/analyze/deployment-manifest/member-types.js +2 -0
- package/dist/analyze/deployment-manifest/member-types.js.map +1 -1
- package/dist/analyze/diff-seeds.d.ts +33 -0
- package/dist/analyze/diff-seeds.d.ts.map +1 -0
- package/dist/analyze/diff-seeds.js +299 -0
- package/dist/analyze/diff-seeds.js.map +1 -0
- package/dist/analyze/edge-filters.d.ts +62 -0
- package/dist/analyze/edge-filters.d.ts.map +1 -0
- package/dist/analyze/edge-filters.js +127 -0
- package/dist/analyze/edge-filters.js.map +1 -0
- package/dist/analyze/field-scope.d.ts +25 -0
- package/dist/analyze/field-scope.d.ts.map +1 -0
- package/dist/analyze/field-scope.js +94 -0
- package/dist/analyze/field-scope.js.map +1 -0
- package/dist/analyze/find-nodes.d.ts +48 -12
- package/dist/analyze/find-nodes.d.ts.map +1 -1
- package/dist/analyze/find-nodes.js +323 -12
- package/dist/analyze/find-nodes.js.map +1 -1
- package/dist/analyze/findings.d.ts +1 -1
- package/dist/analyze/findings.d.ts.map +1 -1
- package/dist/analyze/findings.js +15 -3
- package/dist/analyze/findings.js.map +1 -1
- package/dist/analyze/git-diff.d.ts +27 -1
- package/dist/analyze/git-diff.d.ts.map +1 -1
- package/dist/analyze/git-diff.js +198 -26
- package/dist/analyze/git-diff.js.map +1 -1
- package/dist/analyze/governor.d.ts +25 -4
- package/dist/analyze/governor.d.ts.map +1 -1
- package/dist/analyze/governor.js +82 -18
- package/dist/analyze/governor.js.map +1 -1
- package/dist/analyze/index.d.ts +6 -0
- package/dist/analyze/index.d.ts.map +1 -1
- package/dist/analyze/index.js +6 -0
- package/dist/analyze/index.js.map +1 -1
- package/dist/analyze/path-to-qname.d.ts +9 -0
- package/dist/analyze/path-to-qname.d.ts.map +1 -1
- package/dist/analyze/path-to-qname.js +58 -15
- package/dist/analyze/path-to-qname.js.map +1 -1
- package/dist/analyze/populate.d.ts +40 -0
- package/dist/analyze/populate.d.ts.map +1 -1
- package/dist/analyze/populate.js +203 -58
- package/dist/analyze/populate.js.map +1 -1
- package/dist/analyze/pseudo-endpoints.d.ts +67 -0
- package/dist/analyze/pseudo-endpoints.d.ts.map +1 -0
- package/dist/analyze/pseudo-endpoints.js +78 -0
- package/dist/analyze/pseudo-endpoints.js.map +1 -0
- package/dist/analyze/security.d.ts +17 -0
- package/dist/analyze/security.d.ts.map +1 -1
- package/dist/analyze/security.js +103 -18
- package/dist/analyze/security.js.map +1 -1
- package/dist/analyze/test-coverage.d.ts +48 -0
- package/dist/analyze/test-coverage.d.ts.map +1 -1
- package/dist/analyze/test-coverage.js +72 -1
- package/dist/analyze/test-coverage.js.map +1 -1
- package/dist/analyze/wip-changed-files.d.ts +88 -0
- package/dist/analyze/wip-changed-files.d.ts.map +1 -0
- package/dist/analyze/wip-changed-files.js +422 -0
- package/dist/analyze/wip-changed-files.js.map +1 -0
- package/dist/analyze/wip-impact.d.ts +59 -0
- package/dist/analyze/wip-impact.d.ts.map +1 -1
- package/dist/analyze/wip-impact.js +199 -116
- package/dist/analyze/wip-impact.js.map +1 -1
- package/dist/domain/apex-platform.d.ts +10 -0
- package/dist/domain/apex-platform.d.ts.map +1 -0
- package/dist/domain/apex-platform.js +231 -0
- package/dist/domain/apex-platform.js.map +1 -0
- package/dist/domain/index.d.ts +2 -0
- package/dist/domain/index.d.ts.map +1 -1
- package/dist/domain/index.js +2 -0
- package/dist/domain/index.js.map +1 -1
- package/dist/domain/metadata-category.d.ts +1 -0
- package/dist/domain/metadata-category.d.ts.map +1 -1
- package/dist/domain/metadata-category.js +1 -0
- package/dist/domain/metadata-category.js.map +1 -1
- package/dist/domain/rel-types.d.ts +7 -0
- package/dist/domain/rel-types.d.ts.map +1 -1
- package/dist/domain/rel-types.js +7 -0
- package/dist/domain/rel-types.js.map +1 -1
- package/dist/domain/standard-sobjects.d.ts +20 -0
- package/dist/domain/standard-sobjects.d.ts.map +1 -0
- package/dist/domain/standard-sobjects.js +183 -0
- package/dist/domain/standard-sobjects.js.map +1 -0
- package/dist/embedding/cache.d.ts +41 -0
- package/dist/embedding/cache.d.ts.map +1 -0
- package/dist/embedding/cache.js +69 -0
- package/dist/embedding/cache.js.map +1 -0
- package/dist/embedding/embed.d.ts +59 -0
- package/dist/embedding/embed.d.ts.map +1 -1
- package/dist/embedding/embed.js +207 -29
- package/dist/embedding/embed.js.map +1 -1
- package/dist/embedding/index.d.ts +7 -0
- package/dist/embedding/index.d.ts.map +1 -1
- package/dist/embedding/index.js +4 -0
- package/dist/embedding/index.js.map +1 -1
- package/dist/embedding/pool.d.ts +66 -6
- package/dist/embedding/pool.d.ts.map +1 -1
- package/dist/embedding/pool.js +156 -6
- package/dist/embedding/pool.js.map +1 -1
- package/dist/embedding/queue.d.ts +166 -9
- package/dist/embedding/queue.d.ts.map +1 -1
- package/dist/embedding/queue.js +397 -39
- package/dist/embedding/queue.js.map +1 -1
- package/dist/embedding/tokenize.d.ts +18 -0
- package/dist/embedding/tokenize.d.ts.map +1 -0
- package/dist/embedding/tokenize.js +43 -0
- package/dist/embedding/tokenize.js.map +1 -0
- package/dist/embedding/worker.d.ts +0 -5
- package/dist/embedding/worker.d.ts.map +1 -1
- package/dist/embedding/worker.js +27 -4
- package/dist/embedding/worker.js.map +1 -1
- package/dist/extractors/filesystem/index.d.ts +21 -1
- package/dist/extractors/filesystem/index.d.ts.map +1 -1
- package/dist/extractors/filesystem/index.js +195 -38
- package/dist/extractors/filesystem/index.js.map +1 -1
- package/dist/extractors/filesystem/vlocity-datapacks.d.ts +27 -0
- package/dist/extractors/filesystem/vlocity-datapacks.d.ts.map +1 -0
- package/dist/extractors/filesystem/vlocity-datapacks.js +201 -0
- package/dist/extractors/filesystem/vlocity-datapacks.js.map +1 -0
- package/dist/extractors/interfaces/metadata-source.d.ts +40 -0
- package/dist/extractors/interfaces/metadata-source.d.ts.map +1 -1
- package/dist/extractors/live-org/bulk-retrieve.d.ts +206 -1
- package/dist/extractors/live-org/bulk-retrieve.d.ts.map +1 -1
- package/dist/extractors/live-org/bulk-retrieve.js +706 -94
- package/dist/extractors/live-org/bulk-retrieve.js.map +1 -1
- package/dist/extractors/live-org/capabilities.d.ts +15 -0
- package/dist/extractors/live-org/capabilities.d.ts.map +1 -1
- package/dist/extractors/live-org/capabilities.js +54 -9
- package/dist/extractors/live-org/capabilities.js.map +1 -1
- package/dist/extractors/live-org/extractors/apex.d.ts +12 -2
- package/dist/extractors/live-org/extractors/apex.d.ts.map +1 -1
- package/dist/extractors/live-org/extractors/apex.js +171 -75
- package/dist/extractors/live-org/extractors/apex.js.map +1 -1
- package/dist/extractors/live-org/extractors/custom-settings.d.ts +4 -0
- package/dist/extractors/live-org/extractors/custom-settings.d.ts.map +1 -0
- package/dist/extractors/live-org/extractors/custom-settings.js +76 -0
- package/dist/extractors/live-org/extractors/custom-settings.js.map +1 -0
- package/dist/extractors/live-org/extractors/flow.d.ts +2 -1
- package/dist/extractors/live-org/extractors/flow.d.ts.map +1 -1
- package/dist/extractors/live-org/extractors/flow.js +12 -3
- package/dist/extractors/live-org/extractors/flow.js.map +1 -1
- package/dist/extractors/live-org/extractors/generic-metadata.d.ts +23 -3
- package/dist/extractors/live-org/extractors/generic-metadata.d.ts.map +1 -1
- package/dist/extractors/live-org/extractors/generic-metadata.js +110 -25
- package/dist/extractors/live-org/extractors/generic-metadata.js.map +1 -1
- package/dist/extractors/live-org/extractors/generic-sobject.js.map +1 -1
- package/dist/extractors/live-org/extractors/integration.d.ts +2 -1
- package/dist/extractors/live-org/extractors/integration.d.ts.map +1 -1
- package/dist/extractors/live-org/extractors/integration.js +14 -5
- package/dist/extractors/live-org/extractors/integration.js.map +1 -1
- package/dist/extractors/live-org/extractors/lwc.d.ts +2 -1
- package/dist/extractors/live-org/extractors/lwc.d.ts.map +1 -1
- package/dist/extractors/live-org/extractors/lwc.js +95 -47
- package/dist/extractors/live-org/extractors/lwc.js.map +1 -1
- package/dist/extractors/live-org/extractors/mcd-baseline.d.ts.map +1 -1
- package/dist/extractors/live-org/extractors/mcd-baseline.js +2 -4
- package/dist/extractors/live-org/extractors/mcd-baseline.js.map +1 -1
- package/dist/extractors/live-org/extractors/object.d.ts +2 -11
- package/dist/extractors/live-org/extractors/object.d.ts.map +1 -1
- package/dist/extractors/live-org/extractors/object.js +127 -226
- package/dist/extractors/live-org/extractors/object.js.map +1 -1
- package/dist/extractors/live-org/extractors/omnistudio-retrieve.d.ts.map +1 -1
- package/dist/extractors/live-org/extractors/omnistudio-retrieve.js.map +1 -1
- package/dist/extractors/live-org/extractors/omnistudio.d.ts +11 -1
- package/dist/extractors/live-org/extractors/omnistudio.d.ts.map +1 -1
- package/dist/extractors/live-org/extractors/omnistudio.js +104 -16
- package/dist/extractors/live-org/extractors/omnistudio.js.map +1 -1
- package/dist/extractors/live-org/extractors/security.d.ts +12 -1
- package/dist/extractors/live-org/extractors/security.d.ts.map +1 -1
- package/dist/extractors/live-org/extractors/security.js +29 -7
- package/dist/extractors/live-org/extractors/security.js.map +1 -1
- package/dist/extractors/live-org/rate-limit.d.ts +48 -16
- package/dist/extractors/live-org/rate-limit.d.ts.map +1 -1
- package/dist/extractors/live-org/rate-limit.js +235 -40
- package/dist/extractors/live-org/rate-limit.js.map +1 -1
- package/dist/extractors/live-org/retry.d.ts +136 -0
- package/dist/extractors/live-org/retry.d.ts.map +1 -0
- package/dist/extractors/live-org/retry.js +416 -0
- package/dist/extractors/live-org/retry.js.map +1 -0
- package/dist/extractors/live-org/vlocity/runner.d.ts +2 -1
- package/dist/extractors/live-org/vlocity/runner.d.ts.map +1 -1
- package/dist/extractors/live-org/vlocity/runner.js +124 -72
- package/dist/extractors/live-org/vlocity/runner.js.map +1 -1
- package/dist/extractors/vlocity-shared/row.d.ts +19 -0
- package/dist/extractors/vlocity-shared/row.d.ts.map +1 -0
- package/dist/extractors/vlocity-shared/row.js +69 -0
- package/dist/extractors/vlocity-shared/row.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/ingest/delta.d.ts +70 -0
- package/dist/ingest/delta.d.ts.map +1 -0
- package/dist/ingest/delta.js +534 -0
- package/dist/ingest/delta.js.map +1 -0
- package/dist/ingest/detect-deletions-guard.d.ts +79 -0
- package/dist/ingest/detect-deletions-guard.d.ts.map +1 -0
- package/dist/ingest/detect-deletions-guard.js +122 -0
- package/dist/ingest/detect-deletions-guard.js.map +1 -0
- package/dist/ingest/index.d.ts +8 -1
- package/dist/ingest/index.d.ts.map +1 -1
- package/dist/ingest/index.js +4 -0
- package/dist/ingest/index.js.map +1 -1
- package/dist/ingest/live-ingest.d.ts +180 -0
- package/dist/ingest/live-ingest.d.ts.map +1 -1
- package/dist/ingest/live-ingest.js +1617 -625
- package/dist/ingest/live-ingest.js.map +1 -1
- package/dist/ingest/lock.d.ts +47 -0
- package/dist/ingest/lock.d.ts.map +1 -0
- package/dist/ingest/lock.js +222 -0
- package/dist/ingest/lock.js.map +1 -0
- package/dist/ingest/member-rows.d.ts +88 -0
- package/dist/ingest/member-rows.d.ts.map +1 -0
- package/dist/ingest/member-rows.js +152 -0
- package/dist/ingest/member-rows.js.map +1 -0
- package/dist/ingest/offline-org.d.ts +8 -0
- package/dist/ingest/offline-org.d.ts.map +1 -0
- package/dist/ingest/offline-org.js +41 -0
- package/dist/ingest/offline-org.js.map +1 -0
- package/dist/ingest/parse-member.d.ts +53 -0
- package/dist/ingest/parse-member.d.ts.map +1 -0
- package/dist/ingest/parse-member.js +276 -0
- package/dist/ingest/parse-member.js.map +1 -0
- package/dist/ingest/parse-pool.d.ts +139 -0
- package/dist/ingest/parse-pool.d.ts.map +1 -0
- package/dist/ingest/parse-pool.js +593 -0
- package/dist/ingest/parse-pool.js.map +1 -0
- package/dist/ingest/parse-worker.d.ts +3 -0
- package/dist/ingest/parse-worker.d.ts.map +1 -0
- package/dist/ingest/parse-worker.js +100 -0
- package/dist/ingest/parse-worker.js.map +1 -0
- package/dist/ingest/profile.d.ts +27 -0
- package/dist/ingest/profile.d.ts.map +1 -0
- package/dist/ingest/profile.js +48 -0
- package/dist/ingest/profile.js.map +1 -0
- package/dist/ingest/resolver-gates.d.ts +12 -0
- package/dist/ingest/resolver-gates.d.ts.map +1 -0
- package/dist/ingest/resolver-gates.js +53 -0
- package/dist/ingest/resolver-gates.js.map +1 -0
- package/dist/parsers/apex/arity-resolver.d.ts +16 -3
- package/dist/parsers/apex/arity-resolver.d.ts.map +1 -1
- package/dist/parsers/apex/arity-resolver.js +31 -2
- package/dist/parsers/apex/arity-resolver.js.map +1 -1
- package/dist/parsers/apex/ast-extractor.d.ts +4 -0
- package/dist/parsers/apex/ast-extractor.d.ts.map +1 -1
- package/dist/parsers/apex/ast-extractor.js +128 -29
- package/dist/parsers/apex/ast-extractor.js.map +1 -1
- package/dist/parsers/apex/class-refs.d.ts +78 -0
- package/dist/parsers/apex/class-refs.d.ts.map +1 -0
- package/dist/parsers/apex/class-refs.js +465 -0
- package/dist/parsers/apex/class-refs.js.map +1 -0
- package/dist/parsers/apex/class.d.ts +158 -0
- package/dist/parsers/apex/class.d.ts.map +1 -1
- package/dist/parsers/apex/class.js +1073 -172
- package/dist/parsers/apex/class.js.map +1 -1
- package/dist/parsers/apex/dynamic-soql.d.ts +52 -0
- package/dist/parsers/apex/dynamic-soql.d.ts.map +1 -0
- package/dist/parsers/apex/dynamic-soql.js +427 -0
- package/dist/parsers/apex/dynamic-soql.js.map +1 -0
- package/dist/parsers/apex/field-access.d.ts +65 -0
- package/dist/parsers/apex/field-access.d.ts.map +1 -0
- package/dist/parsers/apex/field-access.js +438 -0
- package/dist/parsers/apex/field-access.js.map +1 -0
- package/dist/parsers/apex/interface-ref-resolver.d.ts +32 -0
- package/dist/parsers/apex/interface-ref-resolver.d.ts.map +1 -0
- package/dist/parsers/apex/interface-ref-resolver.js +64 -0
- package/dist/parsers/apex/interface-ref-resolver.js.map +1 -0
- package/dist/parsers/apex/name-refs.d.ts +83 -0
- package/dist/parsers/apex/name-refs.d.ts.map +1 -0
- package/dist/parsers/apex/name-refs.js +465 -0
- package/dist/parsers/apex/name-refs.js.map +1 -0
- package/dist/parsers/apex/page-refs.d.ts +11 -0
- package/dist/parsers/apex/page-refs.d.ts.map +1 -0
- package/dist/parsers/apex/page-refs.js +34 -0
- package/dist/parsers/apex/page-refs.js.map +1 -0
- package/dist/parsers/apex/ref-resolver.d.ts +58 -0
- package/dist/parsers/apex/ref-resolver.d.ts.map +1 -0
- package/dist/parsers/apex/ref-resolver.js +348 -0
- package/dist/parsers/apex/ref-resolver.js.map +1 -0
- package/dist/parsers/apex/soql-fields.d.ts +75 -0
- package/dist/parsers/apex/soql-fields.d.ts.map +1 -0
- package/dist/parsers/apex/soql-fields.js +338 -0
- package/dist/parsers/apex/soql-fields.js.map +1 -0
- package/dist/parsers/apex/trigger.d.ts.map +1 -1
- package/dist/parsers/apex/trigger.js +100 -2
- package/dist/parsers/apex/trigger.js.map +1 -1
- package/dist/parsers/apex/vlocity-calls.d.ts +25 -0
- package/dist/parsers/apex/vlocity-calls.d.ts.map +1 -0
- package/dist/parsers/apex/vlocity-calls.js +225 -0
- package/dist/parsers/apex/vlocity-calls.js.map +1 -0
- package/dist/parsers/aura/bundle.d.ts +39 -0
- package/dist/parsers/aura/bundle.d.ts.map +1 -0
- package/dist/parsers/aura/bundle.js +269 -0
- package/dist/parsers/aura/bundle.js.map +1 -0
- package/dist/parsers/aura/embed-resolver.d.ts +17 -0
- package/dist/parsers/aura/embed-resolver.d.ts.map +1 -0
- package/dist/parsers/aura/embed-resolver.js +58 -0
- package/dist/parsers/aura/embed-resolver.js.map +1 -0
- package/dist/parsers/aura/index.d.ts +4 -0
- package/dist/parsers/aura/index.d.ts.map +1 -0
- package/dist/parsers/aura/index.js +6 -0
- package/dist/parsers/aura/index.js.map +1 -0
- package/dist/parsers/common.d.ts +9 -0
- package/dist/parsers/common.d.ts.map +1 -1
- package/dist/parsers/common.js +17 -0
- package/dist/parsers/common.js.map +1 -1
- package/dist/parsers/cross-flavor-resolver.js +8 -2
- package/dist/parsers/cross-flavor-resolver.js.map +1 -1
- package/dist/parsers/flow/invocable-resolver.d.ts.map +1 -1
- package/dist/parsers/flow/invocable-resolver.js +2 -0
- package/dist/parsers/flow/invocable-resolver.js.map +1 -1
- package/dist/parsers/flow/parser.d.ts +9 -0
- package/dist/parsers/flow/parser.d.ts.map +1 -1
- package/dist/parsers/flow/parser.js +327 -2
- package/dist/parsers/flow/parser.js.map +1 -1
- package/dist/parsers/flow/relationship-resolver.d.ts +34 -0
- package/dist/parsers/flow/relationship-resolver.d.ts.map +1 -0
- package/dist/parsers/flow/relationship-resolver.js +199 -0
- package/dist/parsers/flow/relationship-resolver.js.map +1 -0
- package/dist/parsers/generic/opaque-node-parser.d.ts +5 -1
- package/dist/parsers/generic/opaque-node-parser.d.ts.map +1 -1
- package/dist/parsers/generic/opaque-node-parser.js +37 -5
- package/dist/parsers/generic/opaque-node-parser.js.map +1 -1
- package/dist/parsers/generic/reflection-walker.d.ts +7 -0
- package/dist/parsers/generic/reflection-walker.d.ts.map +1 -1
- package/dist/parsers/generic/reflection-walker.js +38 -13
- package/dist/parsers/generic/reflection-walker.js.map +1 -1
- package/dist/parsers/hash-salts.d.ts +72 -0
- package/dist/parsers/hash-salts.d.ts.map +1 -0
- package/dist/parsers/hash-salts.js +91 -0
- package/dist/parsers/hash-salts.js.map +1 -0
- package/dist/parsers/index.d.ts +2 -0
- package/dist/parsers/index.d.ts.map +1 -1
- package/dist/parsers/index.js +2 -0
- package/dist/parsers/index.js.map +1 -1
- package/dist/parsers/lwc/bundle.d.ts +1 -0
- package/dist/parsers/lwc/bundle.d.ts.map +1 -1
- package/dist/parsers/lwc/bundle.js +37 -2
- package/dist/parsers/lwc/bundle.js.map +1 -1
- package/dist/parsers/lwc/field-key-resolver.d.ts +32 -0
- package/dist/parsers/lwc/field-key-resolver.d.ts.map +1 -0
- package/dist/parsers/lwc/field-key-resolver.js +92 -0
- package/dist/parsers/lwc/field-key-resolver.js.map +1 -0
- package/dist/parsers/lwc/html-visitor.d.ts +1 -1
- package/dist/parsers/lwc/html-visitor.d.ts.map +1 -1
- package/dist/parsers/lwc/html-visitor.js +81 -3
- package/dist/parsers/lwc/html-visitor.js.map +1 -1
- package/dist/parsers/lwc/js-visitor.d.ts +16 -0
- package/dist/parsers/lwc/js-visitor.d.ts.map +1 -1
- package/dist/parsers/lwc/js-visitor.js +354 -12
- package/dist/parsers/lwc/js-visitor.js.map +1 -1
- package/dist/parsers/lwc/omnidef.d.ts +10 -0
- package/dist/parsers/lwc/omnidef.d.ts.map +1 -0
- package/dist/parsers/lwc/omnidef.js +127 -0
- package/dist/parsers/lwc/omnidef.js.map +1 -0
- package/dist/parsers/lwc/xml-meta.d.ts.map +1 -1
- package/dist/parsers/lwc/xml-meta.js +16 -1
- package/dist/parsers/lwc/xml-meta.js.map +1 -1
- package/dist/parsers/object/formula-hop-resolver.d.ts +33 -0
- package/dist/parsers/object/formula-hop-resolver.d.ts.map +1 -0
- package/dist/parsers/object/formula-hop-resolver.js +60 -0
- package/dist/parsers/object/formula-hop-resolver.js.map +1 -0
- package/dist/parsers/object/formula-refs.d.ts +40 -0
- package/dist/parsers/object/formula-refs.d.ts.map +1 -0
- package/dist/parsers/object/formula-refs.js +129 -0
- package/dist/parsers/object/formula-refs.js.map +1 -0
- package/dist/parsers/object/object.d.ts +3 -0
- package/dist/parsers/object/object.d.ts.map +1 -1
- package/dist/parsers/object/object.js +54 -57
- package/dist/parsers/object/object.js.map +1 -1
- package/dist/parsers/omnistudio/data-transform.d.ts.map +1 -1
- package/dist/parsers/omnistudio/data-transform.js +40 -7
- package/dist/parsers/omnistudio/data-transform.js.map +1 -1
- package/dist/parsers/omnistudio/integration-procedure.d.ts.map +1 -1
- package/dist/parsers/omnistudio/integration-procedure.js +6 -6
- package/dist/parsers/omnistudio/integration-procedure.js.map +1 -1
- package/dist/parsers/omnistudio/overlap-detector.d.ts.map +1 -1
- package/dist/parsers/omnistudio/overlap-detector.js +29 -11
- package/dist/parsers/omnistudio/overlap-detector.js.map +1 -1
- package/dist/parsers/omnistudio/process.d.ts.map +1 -1
- package/dist/parsers/omnistudio/process.js +6 -6
- package/dist/parsers/omnistudio/process.js.map +1 -1
- package/dist/parsers/omnistudio/remote-refs.d.ts +11 -0
- package/dist/parsers/omnistudio/remote-refs.d.ts.map +1 -0
- package/dist/parsers/omnistudio/remote-refs.js +17 -0
- package/dist/parsers/omnistudio/remote-refs.js.map +1 -0
- package/dist/parsers/omnistudio/ui-card.d.ts.map +1 -1
- package/dist/parsers/omnistudio/ui-card.js +6 -6
- package/dist/parsers/omnistudio/ui-card.js.map +1 -1
- package/dist/parsers/resolver-prune.d.ts +14 -0
- package/dist/parsers/resolver-prune.d.ts.map +1 -0
- package/dist/parsers/resolver-prune.js +29 -0
- package/dist/parsers/resolver-prune.js.map +1 -0
- package/dist/parsers/rules/_engine.d.ts.map +1 -1
- package/dist/parsers/rules/_engine.js +4 -0
- package/dist/parsers/rules/_engine.js.map +1 -1
- package/dist/parsers/rules/_engine.ts +3 -0
- package/dist/parsers/rules/_loader.d.ts +8 -0
- package/dist/parsers/rules/_loader.d.ts.map +1 -1
- package/dist/parsers/rules/_loader.js +17 -0
- package/dist/parsers/rules/_loader.js.map +1 -1
- package/dist/parsers/rules/_loader.ts +19 -0
- package/dist/parsers/rules/_schema.d.ts +12 -12
- package/dist/parsers/rules/_selectors.d.ts +1 -0
- package/dist/parsers/rules/_selectors.d.ts.map +1 -1
- package/dist/parsers/rules/_selectors.js +6 -0
- package/dist/parsers/rules/_selectors.js.map +1 -1
- package/dist/parsers/rules/_selectors.ts +6 -0
- package/dist/parsers/rules/apex-component.yml +49 -4
- package/dist/parsers/rules/apex-page.yml +49 -4
- package/dist/parsers/rules/approval-process.yml +25 -5
- package/dist/parsers/rules/custom-metadata-type.yml +14 -7
- package/dist/parsers/rules/custom-setting.yml +24 -0
- package/dist/parsers/rules/custom-tab.yml +41 -0
- package/dist/parsers/rules/lightning-page.yml +4 -2
- package/dist/parsers/rules/workflow.yml +30 -10
- package/dist/parsers/vf/refs.d.ts +39 -0
- package/dist/parsers/vf/refs.d.ts.map +1 -0
- package/dist/parsers/vf/refs.js +152 -0
- package/dist/parsers/vf/refs.js.map +1 -0
- package/dist/parsers/vlocity/apex-resolver.d.ts +21 -0
- package/dist/parsers/vlocity/apex-resolver.d.ts.map +1 -0
- package/dist/parsers/vlocity/apex-resolver.js +115 -0
- package/dist/parsers/vlocity/apex-resolver.js.map +1 -0
- package/dist/parsers/vlocity/common.d.ts +72 -1
- package/dist/parsers/vlocity/common.d.ts.map +1 -1
- package/dist/parsers/vlocity/common.js +332 -2
- package/dist/parsers/vlocity/common.js.map +1 -1
- package/dist/parsers/vlocity/data-raptor.d.ts +9 -0
- package/dist/parsers/vlocity/data-raptor.d.ts.map +1 -1
- package/dist/parsers/vlocity/data-raptor.js +148 -17
- package/dist/parsers/vlocity/data-raptor.js.map +1 -1
- package/dist/parsers/vlocity/datapack-refs.d.ts +22 -0
- package/dist/parsers/vlocity/datapack-refs.d.ts.map +1 -0
- package/dist/parsers/vlocity/datapack-refs.js +126 -0
- package/dist/parsers/vlocity/datapack-refs.js.map +1 -0
- package/dist/parsers/vlocity/dr-relationship-resolver.d.ts +26 -0
- package/dist/parsers/vlocity/dr-relationship-resolver.d.ts.map +1 -0
- package/dist/parsers/vlocity/dr-relationship-resolver.js +137 -0
- package/dist/parsers/vlocity/dr-relationship-resolver.js.map +1 -0
- package/dist/parsers/vlocity/integration-procedure.d.ts.map +1 -1
- package/dist/parsers/vlocity/integration-procedure.js +15 -48
- package/dist/parsers/vlocity/integration-procedure.js.map +1 -1
- package/dist/parsers/vlocity/name-match-resolver.d.ts +21 -0
- package/dist/parsers/vlocity/name-match-resolver.d.ts.map +1 -0
- package/dist/parsers/vlocity/name-match-resolver.js +97 -0
- package/dist/parsers/vlocity/name-match-resolver.js.map +1 -0
- package/dist/parsers/vlocity/omni-script.d.ts.map +1 -1
- package/dist/parsers/vlocity/omni-script.js +18 -32
- package/dist/parsers/vlocity/omni-script.js.map +1 -1
- package/dist/parsers/vlocity/vlocity-card.d.ts.map +1 -1
- package/dist/parsers/vlocity/vlocity-card.js +30 -36
- package/dist/parsers/vlocity/vlocity-card.js.map +1 -1
- package/dist/render/mermaid/dependency-graph.d.ts.map +1 -1
- package/dist/render/mermaid/dependency-graph.js +13 -1
- package/dist/render/mermaid/dependency-graph.js.map +1 -1
- package/dist/render/mermaid/diff.d.ts.map +1 -1
- package/dist/render/mermaid/diff.js +4 -2
- package/dist/render/mermaid/diff.js.map +1 -1
- package/dist/render/mermaid/shared.d.ts +7 -0
- package/dist/render/mermaid/shared.d.ts.map +1 -1
- package/dist/render/mermaid/shared.js +15 -6
- package/dist/render/mermaid/shared.js.map +1 -1
- package/dist/render/sarif.d.ts.map +1 -1
- package/dist/render/sarif.js +1 -3
- package/dist/render/sarif.js.map +1 -1
- package/dist/storage/index.d.ts +3 -3
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +2 -2
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/interfaces.d.ts +212 -1
- package/dist/storage/interfaces.d.ts.map +1 -1
- package/dist/storage/sqlite/graph-store.d.ts +366 -3
- package/dist/storage/sqlite/graph-store.d.ts.map +1 -1
- package/dist/storage/sqlite/graph-store.js +1755 -68
- package/dist/storage/sqlite/graph-store.js.map +1 -1
- package/dist/storage/sqlite/migrations.d.ts +11 -0
- package/dist/storage/sqlite/migrations.d.ts.map +1 -1
- package/dist/storage/sqlite/migrations.js +245 -11
- package/dist/storage/sqlite/migrations.js.map +1 -1
- package/dist/storage/sqlite/rename-stability.d.ts +1 -1
- package/dist/storage/sqlite/rename-stability.d.ts.map +1 -1
- package/dist/storage/sqlite/rename-stability.js +2 -6
- package/dist/storage/sqlite/rename-stability.js.map +1 -1
- package/dist/storage/sqlite/snapshot-store.d.ts +79 -3
- package/dist/storage/sqlite/snapshot-store.d.ts.map +1 -1
- package/dist/storage/sqlite/snapshot-store.js +500 -100
- package/dist/storage/sqlite/snapshot-store.js.map +1 -1
- package/dist/storage/sqlite/snapshot-versions.d.ts +51 -0
- package/dist/storage/sqlite/snapshot-versions.d.ts.map +1 -0
- package/dist/storage/sqlite/snapshot-versions.js +209 -0
- package/dist/storage/sqlite/snapshot-versions.js.map +1 -0
- package/dist/storage/sqlite/vector-store.d.ts +12 -0
- package/dist/storage/sqlite/vector-store.d.ts.map +1 -1
- package/dist/storage/sqlite/vector-store.js +57 -14
- package/dist/storage/sqlite/vector-store.js.map +1 -1
- package/dist/util/process-owner.d.ts +35 -0
- package/dist/util/process-owner.d.ts.map +1 -0
- package/dist/util/process-owner.js +87 -0
- package/dist/util/process-owner.js.map +1 -0
- package/dist/util/worker-heap-cap.d.ts +10 -0
- package/dist/util/worker-heap-cap.d.ts.map +1 -0
- package/dist/util/worker-heap-cap.js +65 -0
- package/dist/util/worker-heap-cap.js.map +1 -0
- package/package.json +6 -7
- package/dist/analyze/__tests__/audit-graph.test.d.ts +0 -2
- package/dist/analyze/__tests__/audit-graph.test.d.ts.map +0 -1
- package/dist/analyze/__tests__/audit-graph.test.js +0 -122
- package/dist/analyze/__tests__/audit-graph.test.js.map +0 -1
- package/dist/analyze/__tests__/cross-org-two-store.test.d.ts +0 -2
- package/dist/analyze/__tests__/cross-org-two-store.test.d.ts.map +0 -1
- package/dist/analyze/__tests__/cross-org-two-store.test.js +0 -68
- package/dist/analyze/__tests__/cross-org-two-store.test.js.map +0 -1
- package/dist/analyze/__tests__/dead-code-confidence.test.d.ts +0 -2
- package/dist/analyze/__tests__/dead-code-confidence.test.d.ts.map +0 -1
- package/dist/analyze/__tests__/dead-code-confidence.test.js +0 -66
- package/dist/analyze/__tests__/dead-code-confidence.test.js.map +0 -1
- package/dist/analyze/__tests__/deployment-manifest.test.d.ts +0 -2
- package/dist/analyze/__tests__/deployment-manifest.test.d.ts.map +0 -1
- package/dist/analyze/__tests__/deployment-manifest.test.js +0 -66
- package/dist/analyze/__tests__/deployment-manifest.test.js.map +0 -1
- package/dist/analyze/__tests__/find-nodes.test.d.ts +0 -2
- package/dist/analyze/__tests__/find-nodes.test.d.ts.map +0 -1
- package/dist/analyze/__tests__/find-nodes.test.js +0 -129
- package/dist/analyze/__tests__/find-nodes.test.js.map +0 -1
- package/dist/analyze/__tests__/findings.test.d.ts +0 -2
- package/dist/analyze/__tests__/findings.test.d.ts.map +0 -1
- package/dist/analyze/__tests__/findings.test.js +0 -90
- package/dist/analyze/__tests__/findings.test.js.map +0 -1
- package/dist/analyze/__tests__/governor-risks-detection.test.d.ts +0 -2
- package/dist/analyze/__tests__/governor-risks-detection.test.d.ts.map +0 -1
- package/dist/analyze/__tests__/governor-risks-detection.test.js +0 -70
- package/dist/analyze/__tests__/governor-risks-detection.test.js.map +0 -1
- package/dist/analyze/__tests__/populate.test.d.ts +0 -2
- package/dist/analyze/__tests__/populate.test.d.ts.map +0 -1
- package/dist/analyze/__tests__/populate.test.js +0 -129
- package/dist/analyze/__tests__/populate.test.js.map +0 -1
- package/dist/analyze/__tests__/traversal-caps.test.d.ts +0 -2
- package/dist/analyze/__tests__/traversal-caps.test.d.ts.map +0 -1
- package/dist/analyze/__tests__/traversal-caps.test.js +0 -129
- package/dist/analyze/__tests__/traversal-caps.test.js.map +0 -1
- package/dist/analyze/__tests__/wip-impact.test.d.ts +0 -2
- package/dist/analyze/__tests__/wip-impact.test.d.ts.map +0 -1
- package/dist/analyze/__tests__/wip-impact.test.js +0 -134
- package/dist/analyze/__tests__/wip-impact.test.js.map +0 -1
- package/dist/embedding/__tests__/embed.test.d.ts +0 -2
- package/dist/embedding/__tests__/embed.test.d.ts.map +0 -1
- package/dist/embedding/__tests__/embed.test.js +0 -72
- package/dist/embedding/__tests__/embed.test.js.map +0 -1
- package/dist/embedding/__tests__/queue.test.d.ts +0 -2
- package/dist/embedding/__tests__/queue.test.d.ts.map +0 -1
- package/dist/embedding/__tests__/queue.test.js +0 -64
- package/dist/embedding/__tests__/queue.test.js.map +0 -1
- package/dist/extractors/__tests__/network-egress.test.d.ts +0 -2
- package/dist/extractors/__tests__/network-egress.test.d.ts.map +0 -1
- package/dist/extractors/__tests__/network-egress.test.js +0 -32
- package/dist/extractors/__tests__/network-egress.test.js.map +0 -1
- package/dist/extractors/filesystem/__tests__/filesystem.test.d.ts +0 -2
- package/dist/extractors/filesystem/__tests__/filesystem.test.d.ts.map +0 -1
- package/dist/extractors/filesystem/__tests__/filesystem.test.js +0 -96
- package/dist/extractors/filesystem/__tests__/filesystem.test.js.map +0 -1
- package/dist/extractors/live-org/__tests__/_jsforce-mock.d.ts +0 -38
- package/dist/extractors/live-org/__tests__/_jsforce-mock.d.ts.map +0 -1
- package/dist/extractors/live-org/__tests__/_jsforce-mock.js +0 -96
- package/dist/extractors/live-org/__tests__/_jsforce-mock.js.map +0 -1
- package/dist/extractors/live-org/__tests__/auth.test.d.ts +0 -2
- package/dist/extractors/live-org/__tests__/auth.test.d.ts.map +0 -1
- package/dist/extractors/live-org/__tests__/auth.test.js +0 -85
- package/dist/extractors/live-org/__tests__/auth.test.js.map +0 -1
- package/dist/extractors/live-org/__tests__/bulk-retrieve.test.d.ts +0 -2
- package/dist/extractors/live-org/__tests__/bulk-retrieve.test.d.ts.map +0 -1
- package/dist/extractors/live-org/__tests__/bulk-retrieve.test.js +0 -150
- package/dist/extractors/live-org/__tests__/bulk-retrieve.test.js.map +0 -1
- package/dist/extractors/live-org/__tests__/capabilities.test.d.ts +0 -2
- package/dist/extractors/live-org/__tests__/capabilities.test.d.ts.map +0 -1
- package/dist/extractors/live-org/__tests__/capabilities.test.js +0 -54
- package/dist/extractors/live-org/__tests__/capabilities.test.js.map +0 -1
- package/dist/extractors/live-org/__tests__/discovery.test.d.ts +0 -2
- package/dist/extractors/live-org/__tests__/discovery.test.d.ts.map +0 -1
- package/dist/extractors/live-org/__tests__/discovery.test.js +0 -55
- package/dist/extractors/live-org/__tests__/discovery.test.js.map +0 -1
- package/dist/extractors/live-org/__tests__/dispatch.test.d.ts +0 -2
- package/dist/extractors/live-org/__tests__/dispatch.test.d.ts.map +0 -1
- package/dist/extractors/live-org/__tests__/dispatch.test.js +0 -68
- package/dist/extractors/live-org/__tests__/dispatch.test.js.map +0 -1
- package/dist/extractors/live-org/__tests__/extractor-enrichment.test.d.ts +0 -2
- package/dist/extractors/live-org/__tests__/extractor-enrichment.test.d.ts.map +0 -1
- package/dist/extractors/live-org/__tests__/extractor-enrichment.test.js +0 -312
- package/dist/extractors/live-org/__tests__/extractor-enrichment.test.js.map +0 -1
- package/dist/extractors/live-org/__tests__/liveness.test.d.ts +0 -2
- package/dist/extractors/live-org/__tests__/liveness.test.d.ts.map +0 -1
- package/dist/extractors/live-org/__tests__/liveness.test.js +0 -148
- package/dist/extractors/live-org/__tests__/liveness.test.js.map +0 -1
- package/dist/extractors/live-org/__tests__/mcd-baseline.test.d.ts +0 -2
- package/dist/extractors/live-org/__tests__/mcd-baseline.test.d.ts.map +0 -1
- package/dist/extractors/live-org/__tests__/mcd-baseline.test.js +0 -174
- package/dist/extractors/live-org/__tests__/mcd-baseline.test.js.map +0 -1
- package/dist/extractors/live-org/__tests__/metadata-read-batch.test.d.ts +0 -2
- package/dist/extractors/live-org/__tests__/metadata-read-batch.test.d.ts.map +0 -1
- package/dist/extractors/live-org/__tests__/metadata-read-batch.test.js +0 -75
- package/dist/extractors/live-org/__tests__/metadata-read-batch.test.js.map +0 -1
- package/dist/extractors/live-org/__tests__/omnistudio-retrieve.test.d.ts +0 -2
- package/dist/extractors/live-org/__tests__/omnistudio-retrieve.test.d.ts.map +0 -1
- package/dist/extractors/live-org/__tests__/omnistudio-retrieve.test.js +0 -135
- package/dist/extractors/live-org/__tests__/omnistudio-retrieve.test.js.map +0 -1
- package/dist/extractors/live-org/__tests__/pools.test.d.ts +0 -2
- package/dist/extractors/live-org/__tests__/pools.test.d.ts.map +0 -1
- package/dist/extractors/live-org/__tests__/pools.test.js +0 -75
- package/dist/extractors/live-org/__tests__/pools.test.js.map +0 -1
- package/dist/extractors/live-org/__tests__/rate-limit.test.d.ts +0 -2
- package/dist/extractors/live-org/__tests__/rate-limit.test.d.ts.map +0 -1
- package/dist/extractors/live-org/__tests__/rate-limit.test.js +0 -78
- package/dist/extractors/live-org/__tests__/rate-limit.test.js.map +0 -1
- package/dist/extractors/live-org/__tests__/read-only-proxy.test.d.ts +0 -2
- package/dist/extractors/live-org/__tests__/read-only-proxy.test.d.ts.map +0 -1
- package/dist/extractors/live-org/__tests__/read-only-proxy.test.js +0 -376
- package/dist/extractors/live-org/__tests__/read-only-proxy.test.js.map +0 -1
- package/dist/extractors/live-org/__tests__/soql-rebatch.test.d.ts +0 -2
- package/dist/extractors/live-org/__tests__/soql-rebatch.test.d.ts.map +0 -1
- package/dist/extractors/live-org/__tests__/soql-rebatch.test.js +0 -118
- package/dist/extractors/live-org/__tests__/soql-rebatch.test.js.map +0 -1
- package/dist/extractors/live-org/__tests__/source-member.test.d.ts +0 -2
- package/dist/extractors/live-org/__tests__/source-member.test.d.ts.map +0 -1
- package/dist/extractors/live-org/__tests__/source-member.test.js +0 -84
- package/dist/extractors/live-org/__tests__/source-member.test.js.map +0 -1
- package/dist/extractors/live-org/__tests__/vlocity-runner.test.d.ts +0 -2
- package/dist/extractors/live-org/__tests__/vlocity-runner.test.d.ts.map +0 -1
- package/dist/extractors/live-org/__tests__/vlocity-runner.test.js +0 -115
- package/dist/extractors/live-org/__tests__/vlocity-runner.test.js.map +0 -1
- package/dist/ingest/__tests__/full-sync-deletion.test.d.ts +0 -2
- package/dist/ingest/__tests__/full-sync-deletion.test.d.ts.map +0 -1
- package/dist/ingest/__tests__/full-sync-deletion.test.js +0 -200
- package/dist/ingest/__tests__/full-sync-deletion.test.js.map +0 -1
- package/dist/ingest/__tests__/incremental-deletion.test.d.ts +0 -2
- package/dist/ingest/__tests__/incremental-deletion.test.d.ts.map +0 -1
- package/dist/ingest/__tests__/incremental-deletion.test.js +0 -92
- package/dist/ingest/__tests__/incremental-deletion.test.js.map +0 -1
- package/dist/ingest/__tests__/live-ingest.test.d.ts +0 -2
- package/dist/ingest/__tests__/live-ingest.test.d.ts.map +0 -1
- package/dist/ingest/__tests__/live-ingest.test.js +0 -155
- package/dist/ingest/__tests__/live-ingest.test.js.map +0 -1
- package/dist/ingest/__tests__/multi-org-orchestrator.test.d.ts +0 -2
- package/dist/ingest/__tests__/multi-org-orchestrator.test.d.ts.map +0 -1
- package/dist/ingest/__tests__/multi-org-orchestrator.test.js +0 -108
- package/dist/ingest/__tests__/multi-org-orchestrator.test.js.map +0 -1
- package/dist/ingest/__tests__/read-only-wrapping.test.d.ts +0 -2
- package/dist/ingest/__tests__/read-only-wrapping.test.d.ts.map +0 -1
- package/dist/ingest/__tests__/read-only-wrapping.test.js +0 -62
- package/dist/ingest/__tests__/read-only-wrapping.test.js.map +0 -1
- package/dist/parsers/__tests__/_harness.d.ts +0 -13
- package/dist/parsers/__tests__/_harness.d.ts.map +0 -1
- package/dist/parsers/__tests__/_harness.js +0 -84
- package/dist/parsers/__tests__/_harness.js.map +0 -1
- package/dist/parsers/__tests__/apex.golden.test.d.ts +0 -2
- package/dist/parsers/__tests__/apex.golden.test.d.ts.map +0 -1
- package/dist/parsers/__tests__/apex.golden.test.js +0 -28
- package/dist/parsers/__tests__/apex.golden.test.js.map +0 -1
- package/dist/parsers/__tests__/cross-flavor.test.d.ts +0 -2
- package/dist/parsers/__tests__/cross-flavor.test.d.ts.map +0 -1
- package/dist/parsers/__tests__/cross-flavor.test.js +0 -56
- package/dist/parsers/__tests__/cross-flavor.test.js.map +0 -1
- package/dist/parsers/__tests__/edge-provenance.test.d.ts +0 -2
- package/dist/parsers/__tests__/edge-provenance.test.d.ts.map +0 -1
- package/dist/parsers/__tests__/edge-provenance.test.js +0 -44
- package/dist/parsers/__tests__/edge-provenance.test.js.map +0 -1
- package/dist/parsers/__tests__/flow.golden.test.d.ts +0 -2
- package/dist/parsers/__tests__/flow.golden.test.d.ts.map +0 -1
- package/dist/parsers/__tests__/flow.golden.test.js +0 -17
- package/dist/parsers/__tests__/flow.golden.test.js.map +0 -1
- package/dist/parsers/__tests__/integration.golden.test.d.ts +0 -2
- package/dist/parsers/__tests__/integration.golden.test.d.ts.map +0 -1
- package/dist/parsers/__tests__/integration.golden.test.js +0 -31
- package/dist/parsers/__tests__/integration.golden.test.js.map +0 -1
- package/dist/parsers/__tests__/long-tail.golden.test.d.ts +0 -2
- package/dist/parsers/__tests__/long-tail.golden.test.d.ts.map +0 -1
- package/dist/parsers/__tests__/long-tail.golden.test.js +0 -115
- package/dist/parsers/__tests__/long-tail.golden.test.js.map +0 -1
- package/dist/parsers/__tests__/lwc-bindings.test.d.ts +0 -2
- package/dist/parsers/__tests__/lwc-bindings.test.d.ts.map +0 -1
- package/dist/parsers/__tests__/lwc-bindings.test.js +0 -146
- package/dist/parsers/__tests__/lwc-bindings.test.js.map +0 -1
- package/dist/parsers/__tests__/lwc.golden.test.d.ts +0 -2
- package/dist/parsers/__tests__/lwc.golden.test.d.ts.map +0 -1
- package/dist/parsers/__tests__/lwc.golden.test.js +0 -16
- package/dist/parsers/__tests__/lwc.golden.test.js.map +0 -1
- package/dist/parsers/__tests__/mcd-gap-fills.test.d.ts +0 -2
- package/dist/parsers/__tests__/mcd-gap-fills.test.d.ts.map +0 -1
- package/dist/parsers/__tests__/mcd-gap-fills.test.js +0 -75
- package/dist/parsers/__tests__/mcd-gap-fills.test.js.map +0 -1
- package/dist/parsers/__tests__/object-inline-fields.test.d.ts +0 -2
- package/dist/parsers/__tests__/object-inline-fields.test.d.ts.map +0 -1
- package/dist/parsers/__tests__/object-inline-fields.test.js +0 -115
- package/dist/parsers/__tests__/object-inline-fields.test.js.map +0 -1
- package/dist/parsers/__tests__/object.golden.test.d.ts +0 -2
- package/dist/parsers/__tests__/object.golden.test.d.ts.map +0 -1
- package/dist/parsers/__tests__/object.golden.test.js +0 -33
- package/dist/parsers/__tests__/object.golden.test.js.map +0 -1
- package/dist/parsers/__tests__/omnistudio-overlap.test.d.ts +0 -2
- package/dist/parsers/__tests__/omnistudio-overlap.test.d.ts.map +0 -1
- package/dist/parsers/__tests__/omnistudio-overlap.test.js +0 -163
- package/dist/parsers/__tests__/omnistudio-overlap.test.js.map +0 -1
- package/dist/parsers/__tests__/omnistudio.golden.test.d.ts +0 -2
- package/dist/parsers/__tests__/omnistudio.golden.test.d.ts.map +0 -1
- package/dist/parsers/__tests__/omnistudio.golden.test.js +0 -54
- package/dist/parsers/__tests__/omnistudio.golden.test.js.map +0 -1
- package/dist/parsers/__tests__/reflection-walker.test.d.ts +0 -2
- package/dist/parsers/__tests__/reflection-walker.test.d.ts.map +0 -1
- package/dist/parsers/__tests__/reflection-walker.test.js +0 -162
- package/dist/parsers/__tests__/reflection-walker.test.js.map +0 -1
- package/dist/parsers/__tests__/registry.test.d.ts +0 -2
- package/dist/parsers/__tests__/registry.test.d.ts.map +0 -1
- package/dist/parsers/__tests__/registry.test.js +0 -23
- package/dist/parsers/__tests__/registry.test.js.map +0 -1
- package/dist/parsers/__tests__/security.golden.test.d.ts +0 -2
- package/dist/parsers/__tests__/security.golden.test.d.ts.map +0 -1
- package/dist/parsers/__tests__/security.golden.test.js +0 -31
- package/dist/parsers/__tests__/security.golden.test.js.map +0 -1
- package/dist/parsers/__tests__/vlocity.golden.test.d.ts +0 -2
- package/dist/parsers/__tests__/vlocity.golden.test.d.ts.map +0 -1
- package/dist/parsers/__tests__/vlocity.golden.test.js +0 -109
- package/dist/parsers/__tests__/vlocity.golden.test.js.map +0 -1
- package/dist/parsers/__tests__/worker-pool.test.d.ts +0 -2
- package/dist/parsers/__tests__/worker-pool.test.d.ts.map +0 -1
- package/dist/parsers/__tests__/worker-pool.test.js +0 -48
- package/dist/parsers/__tests__/worker-pool.test.js.map +0 -1
- package/dist/parsers/apex/__tests__/arity-resolver.test.d.ts +0 -2
- package/dist/parsers/apex/__tests__/arity-resolver.test.d.ts.map +0 -1
- package/dist/parsers/apex/__tests__/arity-resolver.test.js +0 -135
- package/dist/parsers/apex/__tests__/arity-resolver.test.js.map +0 -1
- package/dist/parsers/apex/__tests__/ast-extractor.test.d.ts +0 -2
- package/dist/parsers/apex/__tests__/ast-extractor.test.d.ts.map +0 -1
- package/dist/parsers/apex/__tests__/ast-extractor.test.js +0 -146
- package/dist/parsers/apex/__tests__/ast-extractor.test.js.map +0 -1
- package/dist/parsers/apex/__tests__/is-test-attribute.test.d.ts +0 -2
- package/dist/parsers/apex/__tests__/is-test-attribute.test.d.ts.map +0 -1
- package/dist/parsers/apex/__tests__/is-test-attribute.test.js +0 -54
- package/dist/parsers/apex/__tests__/is-test-attribute.test.js.map +0 -1
- package/dist/parsers/apex/__tests__/regex-arg-count.test.d.ts +0 -2
- package/dist/parsers/apex/__tests__/regex-arg-count.test.d.ts.map +0 -1
- package/dist/parsers/apex/__tests__/regex-arg-count.test.js +0 -82
- package/dist/parsers/apex/__tests__/regex-arg-count.test.js.map +0 -1
- package/dist/parsers/flow/__tests__/invocable-resolver.test.d.ts +0 -2
- package/dist/parsers/flow/__tests__/invocable-resolver.test.d.ts.map +0 -1
- package/dist/parsers/flow/__tests__/invocable-resolver.test.js +0 -91
- package/dist/parsers/flow/__tests__/invocable-resolver.test.js.map +0 -1
- package/dist/parsers/rules/__tests__/applies-to.test.d.ts +0 -2
- package/dist/parsers/rules/__tests__/applies-to.test.d.ts.map +0 -1
- package/dist/parsers/rules/__tests__/applies-to.test.js +0 -31
- package/dist/parsers/rules/__tests__/applies-to.test.js.map +0 -1
- package/dist/parsers/rules/__tests__/applies-to.test.ts +0 -40
- package/dist/parsers/rules/__tests__/engine.test.d.ts +0 -2
- package/dist/parsers/rules/__tests__/engine.test.d.ts.map +0 -1
- package/dist/parsers/rules/__tests__/engine.test.js +0 -127
- package/dist/parsers/rules/__tests__/engine.test.js.map +0 -1
- package/dist/parsers/rules/__tests__/engine.test.ts +0 -138
- package/dist/parsers/rules/__tests__/loader.test.d.ts +0 -2
- package/dist/parsers/rules/__tests__/loader.test.d.ts.map +0 -1
- package/dist/parsers/rules/__tests__/loader.test.js +0 -31
- package/dist/parsers/rules/__tests__/loader.test.js.map +0 -1
- package/dist/parsers/rules/__tests__/loader.test.ts +0 -37
- package/dist/parsers/rules/__tests__/schema.test.d.ts +0 -2
- package/dist/parsers/rules/__tests__/schema.test.d.ts.map +0 -1
- package/dist/parsers/rules/__tests__/schema.test.js +0 -33
- package/dist/parsers/rules/__tests__/schema.test.js.map +0 -1
- package/dist/parsers/rules/__tests__/schema.test.ts +0 -37
- package/dist/parsers/rules/__tests__/selectors.test.d.ts +0 -2
- package/dist/parsers/rules/__tests__/selectors.test.d.ts.map +0 -1
- package/dist/parsers/rules/__tests__/selectors.test.js +0 -51
- package/dist/parsers/rules/__tests__/selectors.test.js.map +0 -1
- package/dist/parsers/rules/__tests__/selectors.test.ts +0 -62
- package/dist/render/__tests__/sarif.test.d.ts +0 -2
- package/dist/render/__tests__/sarif.test.d.ts.map +0 -1
- package/dist/render/__tests__/sarif.test.js +0 -129
- package/dist/render/__tests__/sarif.test.js.map +0 -1
- package/dist/render/mermaid/__tests__/mermaid.test.d.ts +0 -2
- package/dist/render/mermaid/__tests__/mermaid.test.d.ts.map +0 -1
- package/dist/render/mermaid/__tests__/mermaid.test.js +0 -74
- package/dist/render/mermaid/__tests__/mermaid.test.js.map +0 -1
- package/dist/storage/__tests__/analysis-tables-migration.test.d.ts +0 -2
- package/dist/storage/__tests__/analysis-tables-migration.test.d.ts.map +0 -1
- package/dist/storage/__tests__/analysis-tables-migration.test.js +0 -44
- package/dist/storage/__tests__/analysis-tables-migration.test.js.map +0 -1
- package/dist/storage/__tests__/graph-store.test.d.ts +0 -2
- package/dist/storage/__tests__/graph-store.test.d.ts.map +0 -1
- package/dist/storage/__tests__/graph-store.test.js +0 -132
- package/dist/storage/__tests__/graph-store.test.js.map +0 -1
- package/dist/storage/__tests__/identifier.test.d.ts +0 -2
- package/dist/storage/__tests__/identifier.test.d.ts.map +0 -1
- package/dist/storage/__tests__/identifier.test.js +0 -35
- package/dist/storage/__tests__/identifier.test.js.map +0 -1
- package/dist/storage/__tests__/load-better-sqlite3.test.d.ts +0 -2
- package/dist/storage/__tests__/load-better-sqlite3.test.d.ts.map +0 -1
- package/dist/storage/__tests__/load-better-sqlite3.test.js +0 -65
- package/dist/storage/__tests__/load-better-sqlite3.test.js.map +0 -1
- package/dist/storage/__tests__/migrations.test.d.ts +0 -2
- package/dist/storage/__tests__/migrations.test.d.ts.map +0 -1
- package/dist/storage/__tests__/migrations.test.js +0 -93
- package/dist/storage/__tests__/migrations.test.js.map +0 -1
- package/dist/storage/__tests__/perf-50k.test.d.ts +0 -2
- package/dist/storage/__tests__/perf-50k.test.d.ts.map +0 -1
- package/dist/storage/__tests__/perf-50k.test.js +0 -67
- package/dist/storage/__tests__/perf-50k.test.js.map +0 -1
- package/dist/storage/__tests__/rename-stability.test.d.ts +0 -2
- package/dist/storage/__tests__/rename-stability.test.d.ts.map +0 -1
- package/dist/storage/__tests__/rename-stability.test.js +0 -135
- package/dist/storage/__tests__/rename-stability.test.js.map +0 -1
- package/dist/storage/__tests__/snapshot-store.test.d.ts +0 -2
- package/dist/storage/__tests__/snapshot-store.test.d.ts.map +0 -1
- package/dist/storage/__tests__/snapshot-store.test.js +0 -117
- package/dist/storage/__tests__/snapshot-store.test.js.map +0 -1
- package/dist/storage/__tests__/snippets.test.d.ts +0 -2
- package/dist/storage/__tests__/snippets.test.d.ts.map +0 -1
- package/dist/storage/__tests__/snippets.test.js +0 -88
- package/dist/storage/__tests__/snippets.test.js.map +0 -1
- package/dist/storage/__tests__/vector-store-load-failure.test.d.ts +0 -2
- package/dist/storage/__tests__/vector-store-load-failure.test.d.ts.map +0 -1
- package/dist/storage/__tests__/vector-store-load-failure.test.js +0 -42
- package/dist/storage/__tests__/vector-store-load-failure.test.js.map +0 -1
- package/dist/storage/__tests__/vector-store.test.d.ts +0 -2
- package/dist/storage/__tests__/vector-store.test.d.ts.map +0 -1
- package/dist/storage/__tests__/vector-store.test.js +0 -87
- package/dist/storage/__tests__/vector-store.test.js.map +0 -1
- package/dist/telemetry/__tests__/event-schema.test.d.ts +0 -2
- package/dist/telemetry/__tests__/event-schema.test.d.ts.map +0 -1
- package/dist/telemetry/__tests__/event-schema.test.js +0 -56
- package/dist/telemetry/__tests__/event-schema.test.js.map +0 -1
- package/dist/telemetry/__tests__/machine-id.test.d.ts +0 -2
- package/dist/telemetry/__tests__/machine-id.test.d.ts.map +0 -1
- package/dist/telemetry/__tests__/machine-id.test.js +0 -33
- package/dist/telemetry/__tests__/machine-id.test.js.map +0 -1
- package/dist/telemetry/__tests__/pipeline.test.d.ts +0 -2
- package/dist/telemetry/__tests__/pipeline.test.d.ts.map +0 -1
- package/dist/telemetry/__tests__/pipeline.test.js +0 -68
- package/dist/telemetry/__tests__/pipeline.test.js.map +0 -1
- package/dist/telemetry/__tests__/sanitizer.test.d.ts +0 -2
- package/dist/telemetry/__tests__/sanitizer.test.d.ts.map +0 -1
- package/dist/telemetry/__tests__/sanitizer.test.js +0 -143
- package/dist/telemetry/__tests__/sanitizer.test.js.map +0 -1
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
import type { OrgId, QualifiedName } from "@ryanstark24/sfgraph-shared";
|
|
2
2
|
import type { GraphStore } from "../storage/interfaces.js";
|
|
3
|
-
import { type TraversalResult } from "./dependents.js";
|
|
4
|
-
export
|
|
3
|
+
import { type TraversalOpts, type TraversalResult } from "./dependents.js";
|
|
4
|
+
export interface DependencyTraversalOpts extends TraversalOpts {
|
|
5
|
+
/**
|
|
6
|
+
* Containment is not a dependency: do not expand a reached (non-root)
|
|
7
|
+
* CustomObject / CustomField / ValidationRule / RecordType / NamedCredential
|
|
8
|
+
* along structural edges (DEFINES_FIELD, HAS_VALIDATION_RULE,
|
|
9
|
+
* HAS_RECORD_TYPE, field -> field READS_FIELD, ...). The node itself is
|
|
10
|
+
* kept as a leaf. Default false (full expansion, legacy behaviour).
|
|
11
|
+
*/
|
|
12
|
+
leafStructure?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Apex counts at class granularity: when an ApexMethod is reached, its
|
|
15
|
+
* owning ApexClass (via CONTAINS_METHOD) and the class's other methods are
|
|
16
|
+
* reached at the same hop, and traversal continues from them. Default false.
|
|
17
|
+
* (With it a reached class also reaches its methods at the same hop; the
|
|
18
|
+
* root's own members are always hop-0 root members, and Flow / LWCBundle
|
|
19
|
+
* containment is always zero-cost; see containment.ts.)
|
|
20
|
+
*/
|
|
21
|
+
rollupApexClass?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare function findDependencies(store: GraphStore, orgId: OrgId, qname: QualifiedName, depth?: number, opts?: DependencyTraversalOpts): TraversalResult;
|
|
5
24
|
//# sourceMappingURL=dependencies.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependencies.d.ts","sourceRoot":"","sources":["../../src/analyze/dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAExE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"dependencies.d.ts","sourceRoot":"","sources":["../../src/analyze/dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAExE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,eAAe,EAGrB,MAAM,iBAAiB,CAAC;AAUzB,MAAM,WAAW,uBAAwB,SAAQ,aAAa;IAC5D;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,aAAa,EACpB,KAAK,SAAI,EACT,IAAI,GAAE,uBAA4B,GACjC,eAAe,CAyHjB"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { traversalMembers, traversalOwner } from "./containment.js";
|
|
2
|
+
import { TRAVERSAL_NODE_CAP_DEFAULT, containmentAllowed, foldRows, } from "./dependents.js";
|
|
3
|
+
import { isStructuralEdge, keepEdge, labelOfQname } from "./edge-filters.js";
|
|
2
4
|
function nodeCap() {
|
|
3
5
|
const raw = process.env.SFGRAPH_TRAVERSAL_NODE_CAP;
|
|
4
6
|
if (!raw)
|
|
@@ -6,27 +8,113 @@ function nodeCap() {
|
|
|
6
8
|
const n = Number.parseInt(raw, 10);
|
|
7
9
|
return Number.isFinite(n) && n > 0 ? n : TRAVERSAL_NODE_CAP_DEFAULT;
|
|
8
10
|
}
|
|
9
|
-
export function findDependencies(store, orgId, qname, depth = 3) {
|
|
11
|
+
export function findDependencies(store, orgId, qname, depth = 3, opts = {}) {
|
|
10
12
|
const cap = nodeCap();
|
|
11
13
|
const visited = new Set();
|
|
12
|
-
const
|
|
14
|
+
const nodeOf = new Map();
|
|
13
15
|
const edges = [];
|
|
14
|
-
|
|
16
|
+
const reached = [];
|
|
17
|
+
const rowAt = new Map();
|
|
18
|
+
/** Folded qname -> the qname whose row stands for it (containment.ts `row`). */
|
|
19
|
+
const foldInto = new Map();
|
|
20
|
+
/** Containment links (owner -> member) for `rowEdges`. */
|
|
21
|
+
const links = [];
|
|
15
22
|
visited.add(qname);
|
|
16
23
|
let truncated = false;
|
|
17
|
-
|
|
24
|
+
let filtered = 0;
|
|
25
|
+
let structural = 0;
|
|
26
|
+
/** Mark `q` reached at `hop`; returns false when the node cap is hit. */
|
|
27
|
+
const visit = (q, hop, relType, next, via, role) => {
|
|
28
|
+
visited.add(q);
|
|
29
|
+
const n = store.getNode(orgId, q);
|
|
30
|
+
if (n)
|
|
31
|
+
nodeOf.set(q, n);
|
|
32
|
+
rowAt.set(q, reached.length);
|
|
33
|
+
reached.push({
|
|
34
|
+
qualifiedName: q,
|
|
35
|
+
label: n?.label ?? labelOfQname(q),
|
|
36
|
+
hop,
|
|
37
|
+
relType,
|
|
38
|
+
hasNode: n !== null,
|
|
39
|
+
...(via ? { via } : {}),
|
|
40
|
+
...(role ? { role } : {}),
|
|
41
|
+
});
|
|
42
|
+
next.push(q);
|
|
43
|
+
return visited.size < cap;
|
|
44
|
+
};
|
|
45
|
+
const viaFor = (rule) => rule.row === "both" ? "class-rollup" : "contained";
|
|
46
|
+
/**
|
|
47
|
+
* Containment costs no hop (containment.ts): a newly visited owner reaches
|
|
48
|
+
* its members at the same hop, and a newly visited member reaches its owner
|
|
49
|
+
* (Apex only with `rollupApexClass`) and the owner's other members. The
|
|
50
|
+
* root's own members are hop-0 `root-member` rows; the root's owner is not
|
|
51
|
+
* followed (a method seed is not its class).
|
|
52
|
+
*/
|
|
53
|
+
const contain = (q, hop, next, isRoot) => {
|
|
54
|
+
const { members, rule } = traversalMembers(store, orgId, q);
|
|
55
|
+
// Apex class granularity is opt-in (`rollupApexClass`): without it a
|
|
56
|
+
// reached (non-root) class does not pull in its methods (review M5);
|
|
57
|
+
// Flow / LWC containment always folds.
|
|
58
|
+
const expandMembers = isRoot || rule?.row !== "both" || opts.rollupApexClass === true;
|
|
59
|
+
if (rule && expandMembers && containmentAllowed(rule, opts)) {
|
|
60
|
+
for (const m of members) {
|
|
61
|
+
links.push({ srcQualifiedName: q, dstQualifiedName: m, relType: rule.relType });
|
|
62
|
+
if (visited.has(m))
|
|
63
|
+
continue;
|
|
64
|
+
if (isRoot) {
|
|
65
|
+
if (!visit(m, 0, rule.relType, next, undefined, "root-member"))
|
|
66
|
+
return false;
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
if (!visit(m, hop, rule.relType, next, viaFor(rule)))
|
|
70
|
+
return false;
|
|
71
|
+
if (rule.row === "owner")
|
|
72
|
+
foldInto.set(m, q);
|
|
73
|
+
else if (rule.row === "member" && !foldInto.has(q))
|
|
74
|
+
foldInto.set(q, m);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (isRoot)
|
|
78
|
+
return true;
|
|
79
|
+
const own = traversalOwner(store, orgId, q);
|
|
80
|
+
if (!own || !containmentAllowed(own.rule, opts))
|
|
81
|
+
return true;
|
|
82
|
+
if (own.rule.row === "both" && !opts.rollupApexClass)
|
|
83
|
+
return true;
|
|
84
|
+
const o = own.owner;
|
|
85
|
+
links.push({ srcQualifiedName: o, dstQualifiedName: q, relType: own.rule.relType });
|
|
86
|
+
if (own.rule.row === "owner" && rowAt.has(o))
|
|
87
|
+
foldInto.set(q, o);
|
|
88
|
+
if (visited.has(o))
|
|
89
|
+
return true;
|
|
90
|
+
if (!visit(o, hop, own.rule.relType, next, viaFor(own.rule)))
|
|
91
|
+
return false;
|
|
92
|
+
if (own.rule.row === "owner")
|
|
93
|
+
foldInto.set(q, o);
|
|
94
|
+
else if (own.rule.row === "member")
|
|
95
|
+
foldInto.set(o, q);
|
|
96
|
+
return contain(o, hop, next, false);
|
|
97
|
+
};
|
|
98
|
+
let frontier = [qname];
|
|
99
|
+
if (!contain(qname, 0, frontier, true))
|
|
100
|
+
truncated = true;
|
|
101
|
+
bfs: for (let d = 0; d < depth && frontier.length > 0 && !truncated; d++) {
|
|
18
102
|
const next = [];
|
|
19
103
|
for (const cur of frontier) {
|
|
20
104
|
const outgoing = store.listEdgesFrom(orgId, cur);
|
|
21
105
|
for (const e of outgoing) {
|
|
106
|
+
if (!keepEdge(e, opts)) {
|
|
107
|
+
filtered += 1;
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
if (opts.leafStructure && d > 0 && isStructuralEdge(e)) {
|
|
111
|
+
structural += 1;
|
|
112
|
+
continue;
|
|
113
|
+
}
|
|
22
114
|
edges.push(e);
|
|
23
115
|
if (!visited.has(e.dstQualifiedName)) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (n)
|
|
27
|
-
nodes.push(n);
|
|
28
|
-
next.push(e.dstQualifiedName);
|
|
29
|
-
if (visited.size >= cap) {
|
|
116
|
+
const dst = e.dstQualifiedName;
|
|
117
|
+
if (!visit(dst, d + 1, e.relType, next) || !contain(dst, d + 1, next, false)) {
|
|
30
118
|
truncated = true;
|
|
31
119
|
break bfs;
|
|
32
120
|
}
|
|
@@ -35,6 +123,8 @@ export function findDependencies(store, orgId, qname, depth = 3) {
|
|
|
35
123
|
}
|
|
36
124
|
frontier = next;
|
|
37
125
|
}
|
|
38
|
-
|
|
126
|
+
const { rows, nodes, rowEdges } = foldRows(reached, rowAt, foldInto, nodeOf, edges, links);
|
|
127
|
+
const found = store.getNode(orgId, qname) !== null || edges.length > 0 || filtered > 0;
|
|
128
|
+
return { nodes, edges, truncated, filtered, reached: rows, structural, found, rowEdges };
|
|
39
129
|
}
|
|
40
130
|
//# sourceMappingURL=dependencies.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependencies.js","sourceRoot":"","sources":["../../src/analyze/dependencies.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,
|
|
1
|
+
{"version":3,"file":"dependencies.js","sourceRoot":"","sources":["../../src/analyze/dependencies.ts"],"names":[],"mappings":"AAGA,OAAO,EAAiC,gBAAgB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACnG,OAAO,EAGL,0BAA0B,EAG1B,kBAAkB,EAClB,QAAQ,GACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE7E,SAAS,OAAO;IACd,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC;IACnD,IAAI,CAAC,GAAG;QAAE,OAAO,0BAA0B,CAAC;IAC5C,MAAM,CAAC,GAAG,MAA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AS,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AAC3F,CAAC"}
|
|
@@ -1,12 +1,108 @@
|
|
|
1
1
|
import type { OrgId, QualifiedName } from "@ryanstark24/sfgraph-shared";
|
|
2
2
|
import type { EdgeFact, NodeFact } from "../domain/index.js";
|
|
3
3
|
import type { GraphStore } from "../storage/interfaces.js";
|
|
4
|
+
import { type TraversalContainmentRule } from "./containment.js";
|
|
5
|
+
import { type EdgeFilterOpts } from "./edge-filters.js";
|
|
6
|
+
/** One node reached by a traversal, recorded at its first (minimum) hop. */
|
|
7
|
+
export interface ReachedEntry {
|
|
8
|
+
qualifiedName: string;
|
|
9
|
+
/** Node label, or the qname prefix when no node row exists. */
|
|
10
|
+
label: string;
|
|
11
|
+
/** Hop count at which the node was first reached (1 = direct neighbour). */
|
|
12
|
+
hop: number;
|
|
13
|
+
/** Relationship of the edge that first reached it. */
|
|
14
|
+
relType: string;
|
|
15
|
+
/** False when the edge target/source has no node row (dangling). */
|
|
16
|
+
hasNode: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* How the node was reached when not by a direct edge to a frontier node:
|
|
19
|
+
* `class-rollup` = Apex class roll-up (downstream, the method's class and
|
|
20
|
+
* siblings); `member` = an edge to one of the frontier node's members
|
|
21
|
+
* (upstream, e.g. a caller of one of the class's methods); `owner` = an
|
|
22
|
+
* edge to the frontier member's owner itself (upstream, e.g. a type usage
|
|
23
|
+
* of the class a method seed belongs to); `contained` = zero-cost
|
|
24
|
+
* containment (a Flow's FlowVersion, an LWC's bundle; containment.ts).
|
|
25
|
+
*/
|
|
26
|
+
via?: "class-rollup" | "member" | "owner" | "contained";
|
|
27
|
+
/**
|
|
28
|
+
* `root-member`: one of the traced root's own members (an ApexClass root's
|
|
29
|
+
* methods, a Flow root's FlowVersion), listed at hop 0. It is part of the
|
|
30
|
+
* root, not something the root depends on. `entry`: the flow-map entry.
|
|
31
|
+
* `standard-field`: a reached standard field (no `__<suffix>`, e.g. `__c`, `__pc`, `__s`;
|
|
32
|
+
* field-scope.ts), listed apart from the custom components and not counted.
|
|
33
|
+
*/
|
|
34
|
+
role?: "root-member" | "entry" | "standard-field";
|
|
35
|
+
/** Containment partners folded into this row (containment.ts `row`). */
|
|
36
|
+
folded?: string[];
|
|
37
|
+
}
|
|
4
38
|
export interface TraversalResult {
|
|
5
39
|
nodes: NodeFact[];
|
|
6
40
|
edges: EdgeFact[];
|
|
7
41
|
/** Set when the traversal hit `NODE_CAP` before exhausting the graph. */
|
|
8
42
|
truncated?: boolean;
|
|
43
|
+
/** Edges dropped by the relType/security/reflection filter — surfaced so
|
|
44
|
+
* the tool can tell the user "N security/inferred edges hidden". */
|
|
45
|
+
filtered?: number;
|
|
46
|
+
/** Every reached qname (including dangling ones with no node row), in
|
|
47
|
+
* BFS order with min hop and the rel it was reached by. */
|
|
48
|
+
reached?: ReachedEntry[];
|
|
49
|
+
/** Containment edges not followed because of `leafStructure`. */
|
|
50
|
+
structural?: number;
|
|
51
|
+
/** `edges` (plus containment links) between listed rows only, endpoints
|
|
52
|
+
* remapped to the row standing for them: what a diagram should draw. */
|
|
53
|
+
rowEdges?: RowEdge[];
|
|
54
|
+
/** False when the seed qname has no node row and no edges at all (likely a
|
|
55
|
+
* typo): the empty result means "unknown", not "nothing depends on it". */
|
|
56
|
+
found?: boolean;
|
|
57
|
+
}
|
|
58
|
+
export type TraversalOpts = EdgeFilterOpts;
|
|
59
|
+
export interface DependentTraversalOpts extends TraversalOpts {
|
|
60
|
+
/**
|
|
61
|
+
* Containment is not a dependency (mirrors downstream `leafStructure`): an
|
|
62
|
+
* object reached from its own field / validation rule / record type
|
|
63
|
+
* (reverse DEFINES_FIELD, HAS_VALIDATION_RULE, HAS_RECORD_TYPE, CONTAINS)
|
|
64
|
+
* is listed as a leaf and not expanded into every querier of the object.
|
|
65
|
+
* Default true.
|
|
66
|
+
*/
|
|
67
|
+
leafStructure?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Opt-in component-level Apex hops: a reached (non-seed) ApexMethod's next
|
|
70
|
+
* hop also expands the dependents of its class's other methods. Default
|
|
71
|
+
* false (T15 I-3): a reached method's dependents are its own callers plus
|
|
72
|
+
* references to its class itself (class-level references), never callers
|
|
73
|
+
* of unrelated sibling methods.
|
|
74
|
+
*/
|
|
75
|
+
componentHops?: boolean;
|
|
76
|
+
}
|
|
77
|
+
/** True when `e` is a structural (containment) edge out of an object-like node. */
|
|
78
|
+
export declare function isUpstreamStructuralEdge(e: EdgeFact): boolean;
|
|
79
|
+
/** Containment of `rule` survives the caller's rel-type filter. */
|
|
80
|
+
export declare function containmentAllowed(rule: TraversalContainmentRule, opts: EdgeFilterOpts): boolean;
|
|
81
|
+
/** An edge between two listed rows (for diagrams; see `rowEdges`). */
|
|
82
|
+
export interface RowEdge {
|
|
83
|
+
srcQualifiedName: string;
|
|
84
|
+
dstQualifiedName: string;
|
|
85
|
+
relType: string;
|
|
9
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* Apply containment folds: drop folded rows, record them (sorted) on the row
|
|
89
|
+
* standing for them, and list node facts for the remaining rows only. A row
|
|
90
|
+
* reached only by containment takes the hop / rel / via of the member it
|
|
91
|
+
* folds when that member was reached by a real edge (a Flow listed for the
|
|
92
|
+
* FlowVersion that calls the target). Rules never chain (containment.ts), so
|
|
93
|
+
* one step resolves a fold.
|
|
94
|
+
*
|
|
95
|
+
* `rowEdges`: `edges` plus the containment `links`, with each endpoint
|
|
96
|
+
* remapped to the row listed for it (a folded member to its row; an unlisted
|
|
97
|
+
* traversal target such as a sibling method to the row it was expanded
|
|
98
|
+
* through, `displayAs`), deduped, self-loops dropped. Diagrams draw these so
|
|
99
|
+
* no listed box is left disconnected.
|
|
100
|
+
*/
|
|
101
|
+
export declare function foldRows(reached: ReachedEntry[], rowAt: ReadonlyMap<string, number>, foldInto: ReadonlyMap<string, string>, nodeOf: ReadonlyMap<string, NodeFact>, edges?: ReadonlyArray<EdgeFact>, links?: ReadonlyArray<RowEdge>, displayAs?: ReadonlyMap<string, string>): {
|
|
102
|
+
rows: ReachedEntry[];
|
|
103
|
+
nodes: NodeFact[];
|
|
104
|
+
rowEdges: RowEdge[];
|
|
105
|
+
};
|
|
10
106
|
/**
|
|
11
107
|
* Hard ceiling on visited nodes per traversal. Prevents an agent — or a
|
|
12
108
|
* crafted call — from blowing memory by asking for depth=5 on a hub like
|
|
@@ -15,5 +111,24 @@ export interface TraversalResult {
|
|
|
15
111
|
* Override via `TRAVERSAL_NODE_CAP` env var if you really need more.
|
|
16
112
|
*/
|
|
17
113
|
export declare const TRAVERSAL_NODE_CAP_DEFAULT = 500;
|
|
18
|
-
|
|
114
|
+
/**
|
|
115
|
+
* Upstream BFS: who references `qname`, transitively.
|
|
116
|
+
*
|
|
117
|
+
* A reference to a member is a reference to its owner (see containment.ts):
|
|
118
|
+
* expanding an owner such as an ApexClass also follows the incoming edges of
|
|
119
|
+
* its members (CONTAINS_METHOD children), so an LWC importing
|
|
120
|
+
* `ApexMethod:Svc.search(1)` is a dependent of `ApexClass:Svc`. Expanding a
|
|
121
|
+
* member *seed* follows its own incoming edges plus those of its owner itself,
|
|
122
|
+
* never those of its sibling members, so a method seed stays method-scoped.
|
|
123
|
+
* A reached ApexMethod dependent is expanded the same way (its own callers
|
|
124
|
+
* plus references to its class itself); `componentHops: true` widens it to
|
|
125
|
+
* the class's other methods. Edges from the owner or its own
|
|
126
|
+
* members (internal calls) and containment edges are not dependents.
|
|
127
|
+
*
|
|
128
|
+
* Containment costs no hop and is listed as one row: a reached FlowVersion
|
|
129
|
+
* folds into its Flow (whose subflow callers are the next hop), an LWCBundle
|
|
130
|
+
* into its LWC. An object reached from its own field is a leaf
|
|
131
|
+
* (`leafStructure`).
|
|
132
|
+
*/
|
|
133
|
+
export declare function findDependents(store: GraphStore, orgId: OrgId, qname: QualifiedName, depth?: number, opts?: DependentTraversalOpts): TraversalResult;
|
|
19
134
|
//# sourceMappingURL=dependents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependents.d.ts","sourceRoot":"","sources":["../../src/analyze/dependents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"dependents.d.ts","sourceRoot":"","sources":["../../src/analyze/dependents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EACL,KAAK,wBAAwB,EAK9B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,KAAK,cAAc,EAIpB,MAAM,mBAAmB,CAAC;AAE3B,4EAA4E;AAC5E,MAAM,WAAW,YAAY;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,+DAA+D;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,GAAG,EAAE,MAAM,CAAC;IACZ,sDAAsD;IACtD,OAAO,EAAE,MAAM,CAAC;IAChB,oEAAoE;IACpE,OAAO,EAAE,OAAO,CAAC;IACjB;;;;;;;;OAQG;IACH,GAAG,CAAC,EAAE,cAAc,GAAG,QAAQ,GAAG,OAAO,GAAG,WAAW,CAAC;IACxD;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,aAAa,GAAG,OAAO,GAAG,gBAAgB,CAAC;IAClD,wEAAwE;IACxE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,KAAK,EAAE,QAAQ,EAAE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GACjD;IAAE,IAAI,EAAE,YAAY,EAAE,CAAC;IAAC,KAAK,EAAE,QAAQ,EAAE,CAAC;IAAC,QAAQ,EAAE,OAAO,EAAE,CAAA;CAAE,CA0DlE;AAED;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAQ9C;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,aAAa,EACpB,KAAK,SAAI,EACT,IAAI,GAAE,sBAA2B,GAChC,eAAe,CAqLjB"}
|
|
@@ -1,3 +1,103 @@
|
|
|
1
|
+
import { REL_TYPES } from "../domain/index.js";
|
|
2
|
+
import { isMemberContainmentEdge, traversalContainmentRule, traversalMembers, traversalOwner, } from "./containment.js";
|
|
3
|
+
import { STRUCTURE_LEAF_LABELS, keepEdge, labelOfQname, } from "./edge-filters.js";
|
|
4
|
+
/** Reverse structural edges whose source is a leaf upstream. */
|
|
5
|
+
const UPSTREAM_STRUCTURAL_RELTYPES = new Set([
|
|
6
|
+
REL_TYPES.DEFINES_FIELD,
|
|
7
|
+
REL_TYPES.HAS_VALIDATION_RULE,
|
|
8
|
+
REL_TYPES.HAS_RECORD_TYPE,
|
|
9
|
+
REL_TYPES.CONTAINS,
|
|
10
|
+
]);
|
|
11
|
+
/** True when `e` is a structural (containment) edge out of an object-like node. */
|
|
12
|
+
export function isUpstreamStructuralEdge(e) {
|
|
13
|
+
return (UPSTREAM_STRUCTURAL_RELTYPES.has(e.relType) &&
|
|
14
|
+
STRUCTURE_LEAF_LABELS.has(labelOfQname(e.srcQualifiedName)));
|
|
15
|
+
}
|
|
16
|
+
/** Containment of `rule` survives the caller's rel-type filter. */
|
|
17
|
+
export function containmentAllowed(rule, opts) {
|
|
18
|
+
if (opts.includeRelTypes && !opts.includeRelTypes.has(rule.relType))
|
|
19
|
+
return false;
|
|
20
|
+
return !opts.excludeRelTypes?.has(rule.relType);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Apply containment folds: drop folded rows, record them (sorted) on the row
|
|
24
|
+
* standing for them, and list node facts for the remaining rows only. A row
|
|
25
|
+
* reached only by containment takes the hop / rel / via of the member it
|
|
26
|
+
* folds when that member was reached by a real edge (a Flow listed for the
|
|
27
|
+
* FlowVersion that calls the target). Rules never chain (containment.ts), so
|
|
28
|
+
* one step resolves a fold.
|
|
29
|
+
*
|
|
30
|
+
* `rowEdges`: `edges` plus the containment `links`, with each endpoint
|
|
31
|
+
* remapped to the row listed for it (a folded member to its row; an unlisted
|
|
32
|
+
* traversal target such as a sibling method to the row it was expanded
|
|
33
|
+
* through, `displayAs`), deduped, self-loops dropped. Diagrams draw these so
|
|
34
|
+
* no listed box is left disconnected.
|
|
35
|
+
*/
|
|
36
|
+
export function foldRows(reached, rowAt, foldInto, nodeOf, edges = [], links = [], displayAs = new Map()) {
|
|
37
|
+
for (const [f, into] of foldInto) {
|
|
38
|
+
const fi = rowAt.get(f);
|
|
39
|
+
const ii = rowAt.get(into);
|
|
40
|
+
if (fi === undefined || ii === undefined)
|
|
41
|
+
continue;
|
|
42
|
+
const row = reached[ii];
|
|
43
|
+
const gone = reached[fi];
|
|
44
|
+
if (!row || !gone)
|
|
45
|
+
continue;
|
|
46
|
+
const folded = [...(row.folded ?? []), f].sort();
|
|
47
|
+
const adopt = gone.hop < row.hop ||
|
|
48
|
+
(row.via === "contained" && gone.via !== "contained" && gone.hop <= row.hop);
|
|
49
|
+
if (adopt) {
|
|
50
|
+
const { via: _via, ...rest } = row;
|
|
51
|
+
reached[ii] = {
|
|
52
|
+
...rest,
|
|
53
|
+
hop: gone.hop,
|
|
54
|
+
relType: gone.relType,
|
|
55
|
+
...(gone.via ? { via: gone.via } : {}),
|
|
56
|
+
folded,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
row.folded = folded;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
const rows = reached.filter((r) => !(foldInto.has(r.qualifiedName) && rowAt.has(foldInto.get(r.qualifiedName) ?? "")));
|
|
64
|
+
const nodes = [];
|
|
65
|
+
for (const r of rows) {
|
|
66
|
+
const n = nodeOf.get(r.qualifiedName);
|
|
67
|
+
if (n)
|
|
68
|
+
nodes.push(n);
|
|
69
|
+
}
|
|
70
|
+
const listed = new Set(rows.map((r) => r.qualifiedName));
|
|
71
|
+
const resolve = (q) => {
|
|
72
|
+
let cur = q;
|
|
73
|
+
for (let i = 0; i < 4; i++) {
|
|
74
|
+
if (listed.has(cur))
|
|
75
|
+
return cur;
|
|
76
|
+
const f = foldInto.get(cur);
|
|
77
|
+
if (f !== undefined && listed.has(f))
|
|
78
|
+
return f;
|
|
79
|
+
const d = displayAs.get(cur);
|
|
80
|
+
if (d === undefined)
|
|
81
|
+
return cur;
|
|
82
|
+
cur = d;
|
|
83
|
+
}
|
|
84
|
+
return cur;
|
|
85
|
+
};
|
|
86
|
+
const rowEdges = [];
|
|
87
|
+
const seen = new Set();
|
|
88
|
+
for (const e of [...edges, ...links]) {
|
|
89
|
+
const a = resolve(e.srcQualifiedName);
|
|
90
|
+
const b = resolve(e.dstQualifiedName);
|
|
91
|
+
if (a === b)
|
|
92
|
+
continue;
|
|
93
|
+
const k = `${a}\u0000${e.relType}\u0000${b}`;
|
|
94
|
+
if (seen.has(k))
|
|
95
|
+
continue;
|
|
96
|
+
seen.add(k);
|
|
97
|
+
rowEdges.push({ srcQualifiedName: a, dstQualifiedName: b, relType: String(e.relType) });
|
|
98
|
+
}
|
|
99
|
+
return { rows, nodes, rowEdges };
|
|
100
|
+
}
|
|
1
101
|
/**
|
|
2
102
|
* Hard ceiling on visited nodes per traversal. Prevents an agent — or a
|
|
3
103
|
* crafted call — from blowing memory by asking for depth=5 on a hub like
|
|
@@ -13,27 +113,197 @@ function nodeCap() {
|
|
|
13
113
|
const n = Number.parseInt(raw, 10);
|
|
14
114
|
return Number.isFinite(n) && n > 0 ? n : TRAVERSAL_NODE_CAP_DEFAULT;
|
|
15
115
|
}
|
|
16
|
-
|
|
116
|
+
/**
|
|
117
|
+
* Upstream BFS: who references `qname`, transitively.
|
|
118
|
+
*
|
|
119
|
+
* A reference to a member is a reference to its owner (see containment.ts):
|
|
120
|
+
* expanding an owner such as an ApexClass also follows the incoming edges of
|
|
121
|
+
* its members (CONTAINS_METHOD children), so an LWC importing
|
|
122
|
+
* `ApexMethod:Svc.search(1)` is a dependent of `ApexClass:Svc`. Expanding a
|
|
123
|
+
* member *seed* follows its own incoming edges plus those of its owner itself,
|
|
124
|
+
* never those of its sibling members, so a method seed stays method-scoped.
|
|
125
|
+
* A reached ApexMethod dependent is expanded the same way (its own callers
|
|
126
|
+
* plus references to its class itself); `componentHops: true` widens it to
|
|
127
|
+
* the class's other methods. Edges from the owner or its own
|
|
128
|
+
* members (internal calls) and containment edges are not dependents.
|
|
129
|
+
*
|
|
130
|
+
* Containment costs no hop and is listed as one row: a reached FlowVersion
|
|
131
|
+
* folds into its Flow (whose subflow callers are the next hop), an LWCBundle
|
|
132
|
+
* into its LWC. An object reached from its own field is a leaf
|
|
133
|
+
* (`leafStructure`).
|
|
134
|
+
*/
|
|
135
|
+
export function findDependents(store, orgId, qname, depth = 3, opts = {}) {
|
|
17
136
|
const cap = nodeCap();
|
|
137
|
+
const leafStructure = opts.leafStructure !== false;
|
|
138
|
+
const componentHops = opts.componentHops === true;
|
|
18
139
|
const visited = new Set();
|
|
19
|
-
|
|
140
|
+
/** Targets whose incoming edges were already listed (owner or member). */
|
|
141
|
+
const expanded = new Set();
|
|
142
|
+
/** Reached nodes kept as structural leaves (not expanded). */
|
|
143
|
+
const leaves = new Set();
|
|
144
|
+
const nodeOf = new Map();
|
|
20
145
|
const edges = [];
|
|
146
|
+
const reached = [];
|
|
147
|
+
const rowAt = new Map();
|
|
148
|
+
const foldInto = new Map();
|
|
149
|
+
/** Containment links between reached nodes (for `rowEdges`). */
|
|
150
|
+
const links = [];
|
|
151
|
+
/** Unlisted traversal target -> the node it was expanded through. */
|
|
152
|
+
const displayAs = new Map();
|
|
21
153
|
let frontier = [qname];
|
|
22
154
|
visited.add(qname);
|
|
23
155
|
let truncated = false;
|
|
156
|
+
let filtered = 0;
|
|
157
|
+
let structural = 0;
|
|
158
|
+
// Containment lookups, memoised per traversal: every reached method of a
|
|
159
|
+
// class would otherwise re-list the class's members (review M4).
|
|
160
|
+
const membersMemo = new Map();
|
|
161
|
+
const ownerMemo = new Map();
|
|
162
|
+
const membersOf = (q) => {
|
|
163
|
+
let v = membersMemo.get(q);
|
|
164
|
+
if (!v) {
|
|
165
|
+
v = traversalMembers(store, orgId, q);
|
|
166
|
+
membersMemo.set(q, v);
|
|
167
|
+
}
|
|
168
|
+
return v;
|
|
169
|
+
};
|
|
170
|
+
const ownerOfMember = (q) => {
|
|
171
|
+
if (!ownerMemo.has(q))
|
|
172
|
+
ownerMemo.set(q, traversalOwner(store, orgId, q));
|
|
173
|
+
return ownerMemo.get(q) ?? null;
|
|
174
|
+
};
|
|
175
|
+
// A member seed's owner: its other members stay member-scoped at every hop
|
|
176
|
+
// (a sibling calling the seed is a dependent; callers of unrelated
|
|
177
|
+
// siblings are not; review I1).
|
|
178
|
+
const seedOwn = ownerOfMember(qname);
|
|
179
|
+
const seedOwner = seedOwn?.rule.memberScoped ? seedOwn.owner : null;
|
|
180
|
+
/** Record `q` reached; returns false when the node cap is hit. */
|
|
181
|
+
const reach = (q, hop, relType, next, via) => {
|
|
182
|
+
visited.add(q);
|
|
183
|
+
const n = store.getNode(orgId, q);
|
|
184
|
+
if (n)
|
|
185
|
+
nodeOf.set(q, n);
|
|
186
|
+
rowAt.set(q, reached.length);
|
|
187
|
+
reached.push({
|
|
188
|
+
qualifiedName: q,
|
|
189
|
+
label: n?.label ?? labelOfQname(q),
|
|
190
|
+
hop,
|
|
191
|
+
relType,
|
|
192
|
+
hasNode: n !== null,
|
|
193
|
+
...(via ? { via } : {}),
|
|
194
|
+
});
|
|
195
|
+
next.push(q);
|
|
196
|
+
return visited.size < cap;
|
|
197
|
+
};
|
|
198
|
+
/** Zero-cost, folded containment around a newly reached dependent. */
|
|
199
|
+
const contain = (q, hop, next) => {
|
|
200
|
+
const { members, rule } = membersOf(q);
|
|
201
|
+
if (rule && rule.row !== "both" && containmentAllowed(rule, opts)) {
|
|
202
|
+
for (const m of members) {
|
|
203
|
+
if (rule.row === "owner")
|
|
204
|
+
foldInto.set(m, q);
|
|
205
|
+
else if (!foldInto.has(q))
|
|
206
|
+
foldInto.set(q, m);
|
|
207
|
+
links.push({ srcQualifiedName: q, dstQualifiedName: m, relType: rule.relType });
|
|
208
|
+
if (visited.has(m))
|
|
209
|
+
continue;
|
|
210
|
+
if (!reach(m, hop, rule.relType, next, "contained"))
|
|
211
|
+
return false;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
const own = ownerOfMember(q);
|
|
215
|
+
if (!own || own.rule.row === "both" || !containmentAllowed(own.rule, opts))
|
|
216
|
+
return true;
|
|
217
|
+
if (own.rule.row === "owner")
|
|
218
|
+
foldInto.set(q, own.owner);
|
|
219
|
+
else
|
|
220
|
+
foldInto.set(own.owner, q);
|
|
221
|
+
links.push({ srcQualifiedName: own.owner, dstQualifiedName: q, relType: own.rule.relType });
|
|
222
|
+
if (visited.has(own.owner))
|
|
223
|
+
return true;
|
|
224
|
+
if (!reach(own.owner, hop, own.rule.relType, next, "contained"))
|
|
225
|
+
return false;
|
|
226
|
+
return contain(own.owner, hop, next);
|
|
227
|
+
};
|
|
24
228
|
bfs: for (let d = 0; d < depth && frontier.length > 0; d++) {
|
|
25
229
|
const next = [];
|
|
26
230
|
for (const cur of frontier) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
231
|
+
if (leaves.has(cur))
|
|
232
|
+
continue;
|
|
233
|
+
// (target, how a hit through it is reported, the target's own family
|
|
234
|
+
// whose edges into it are internal, not dependents)
|
|
235
|
+
const targets = [];
|
|
236
|
+
const { members } = membersOf(cur);
|
|
237
|
+
if (members.length > 0) {
|
|
238
|
+
// An owner: references to any member are references to it (rule 1).
|
|
239
|
+
const family = new Set([cur, ...members]);
|
|
240
|
+
targets.push([cur, undefined, family]);
|
|
241
|
+
for (const m of members)
|
|
242
|
+
targets.push([m, "member", family]);
|
|
243
|
+
}
|
|
244
|
+
else {
|
|
245
|
+
const own = ownerOfMember(cur);
|
|
246
|
+
if (!own) {
|
|
247
|
+
targets.push([cur, undefined, new Set([cur])]);
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
const owner = own.owner;
|
|
251
|
+
const siblings = membersOf(owner).members;
|
|
252
|
+
const family = new Set([owner, ...siblings, cur]);
|
|
253
|
+
if (own.rule.memberScoped && (d === 0 || !componentHops || owner === seedOwner)) {
|
|
254
|
+
// A member seed (or a member of the seed's own owner): also
|
|
255
|
+
// references to its owner itself, but not to the owner's other
|
|
256
|
+
// members (rule 3).
|
|
257
|
+
targets.push([cur, undefined, new Set([cur])]);
|
|
258
|
+
targets.push([owner, "owner", family]);
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
// A reached member (or a single-member container): the whole
|
|
262
|
+
// component, so the next hop is component-level.
|
|
263
|
+
targets.push([cur, undefined, family]);
|
|
264
|
+
targets.push([owner, "owner", family]);
|
|
265
|
+
for (const m of siblings)
|
|
266
|
+
if (m !== cur)
|
|
267
|
+
targets.push([m, "member", family]);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
for (const [target, via, self] of targets) {
|
|
272
|
+
if (expanded.has(target))
|
|
273
|
+
continue;
|
|
274
|
+
expanded.add(target);
|
|
275
|
+
if (target !== cur && !displayAs.has(target))
|
|
276
|
+
displayAs.set(target, cur);
|
|
277
|
+
for (const e of store.listEdgesTo(orgId, target)) {
|
|
278
|
+
// Containment is structure (rule 2); the owner's own internal
|
|
279
|
+
// calls are not dependents.
|
|
280
|
+
if (isMemberContainmentEdge(e) ||
|
|
281
|
+
traversalContainmentRule(e) !== null ||
|
|
282
|
+
self.has(e.srcQualifiedName)) {
|
|
283
|
+
continue;
|
|
284
|
+
}
|
|
285
|
+
// Filter noise (security grants / reflection inferences) before the
|
|
286
|
+
// edge contributes a node — otherwise a hub like a class granted to
|
|
287
|
+
// 100+ profiles blows the node cap on grant edges alone and the real
|
|
288
|
+
// dependency frontier never gets explored.
|
|
289
|
+
if (!keepEdge(e, opts)) {
|
|
290
|
+
filtered += 1;
|
|
291
|
+
continue;
|
|
292
|
+
}
|
|
293
|
+
edges.push(e);
|
|
294
|
+
const src = e.srcQualifiedName;
|
|
295
|
+
if (visited.has(src))
|
|
296
|
+
continue;
|
|
297
|
+
if (!reach(src, d + 1, e.relType, next, via)) {
|
|
298
|
+
truncated = true;
|
|
299
|
+
break bfs;
|
|
300
|
+
}
|
|
301
|
+
if (leafStructure && isUpstreamStructuralEdge(e)) {
|
|
302
|
+
leaves.add(src);
|
|
303
|
+
structural += 1;
|
|
304
|
+
continue;
|
|
305
|
+
}
|
|
306
|
+
if (!contain(src, d + 1, next)) {
|
|
37
307
|
truncated = true;
|
|
38
308
|
break bfs;
|
|
39
309
|
}
|
|
@@ -42,6 +312,8 @@ export function findDependents(store, orgId, qname, depth = 3) {
|
|
|
42
312
|
}
|
|
43
313
|
frontier = next;
|
|
44
314
|
}
|
|
45
|
-
|
|
315
|
+
const { rows, nodes, rowEdges } = foldRows(reached, rowAt, foldInto, nodeOf, edges, links, displayAs);
|
|
316
|
+
const found = store.getNode(orgId, qname) !== null || edges.length > 0 || filtered > 0;
|
|
317
|
+
return { nodes, edges, truncated, filtered, reached: rows, structural, found, rowEdges };
|
|
46
318
|
}
|
|
47
319
|
//# sourceMappingURL=dependents.js.map
|