@ryanstark24/sfgraph-core 1.4.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 +34 -10
- package/dist/analyze/audit-graph.d.ts.map +1 -1
- package/dist/analyze/audit-graph.js +360 -39
- 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 +20 -1
- package/dist/analyze/dependencies.d.ts.map +1 -1
- package/dist/analyze/dependencies.js +96 -12
- package/dist/analyze/dependencies.js.map +1 -1
- package/dist/analyze/dependents.d.ts +111 -1
- package/dist/analyze/dependents.d.ts.map +1 -1
- package/dist/analyze/dependents.js +282 -20
- 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 +25 -0
- package/dist/analyze/edge-filters.d.ts.map +1 -1
- package/dist/analyze/edge-filters.js +78 -2
- package/dist/analyze/edge-filters.js.map +1 -1
- 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.map +1 -1
- package/dist/analyze/findings.js +14 -0
- 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 +148 -48
- 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 +2 -0
- package/dist/analyze/security.d.ts.map +1 -1
- package/dist/analyze/security.js +44 -15
- 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 -126
- 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/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 +193 -28
- 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 +29 -0
- package/dist/extractors/interfaces/metadata-source.d.ts.map +1 -1
- package/dist/extractors/live-org/bulk-retrieve.d.ts +37 -1
- package/dist/extractors/live-org/bulk-retrieve.d.ts.map +1 -1
- package/dist/extractors/live-org/bulk-retrieve.js +233 -50
- 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 +151 -80
- package/dist/extractors/live-org/extractors/apex.js.map +1 -1
- package/dist/extractors/live-org/extractors/custom-settings.d.ts +2 -1
- package/dist/extractors/live-org/extractors/custom-settings.d.ts.map +1 -1
- package/dist/extractors/live-org/extractors/custom-settings.js +19 -9
- package/dist/extractors/live-org/extractors/custom-settings.js.map +1 -1
- 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/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 +14 -6
- package/dist/extractors/live-org/extractors/lwc.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.d.ts +3 -0
- package/dist/extractors/live-org/extractors/omnistudio.d.ts.map +1 -1
- package/dist/extractors/live-org/extractors/omnistudio.js +57 -22
- 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 +7 -1
- package/dist/extractors/live-org/rate-limit.d.ts.map +1 -1
- package/dist/extractors/live-org/rate-limit.js +53 -10
- 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 +95 -67
- 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 +34 -0
- package/dist/ingest/detect-deletions-guard.d.ts.map +1 -1
- package/dist/ingest/detect-deletions-guard.js +59 -0
- package/dist/ingest/detect-deletions-guard.js.map +1 -1
- 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 +171 -7
- package/dist/ingest/live-ingest.d.ts.map +1 -1
- package/dist/ingest/live-ingest.js +1014 -249
- 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 +96 -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 +1025 -183
- 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 +90 -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 +37 -10
- 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 +78 -1
- 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 +348 -10
- 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 +53 -52
- 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 +2 -2
- 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 +4 -5
- 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 +27 -2
- 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 +4 -5
- 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 +4 -5
- 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 +7 -7
- 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 +56 -1
- package/dist/parsers/vlocity/common.d.ts.map +1 -1
- package/dist/parsers/vlocity/common.js +275 -7
- 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 +133 -31
- 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/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 +155 -1
- package/dist/storage/interfaces.d.ts.map +1 -1
- package/dist/storage/sqlite/graph-store.d.ts +352 -3
- package/dist/storage/sqlite/graph-store.d.ts.map +1 -1
- package/dist/storage/sqlite/graph-store.js +1683 -74
- 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 +226 -11
- package/dist/storage/sqlite/migrations.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 -201
- 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__/edge-filters.test.d.ts +0 -2
- package/dist/analyze/__tests__/edge-filters.test.d.ts.map +0 -1
- package/dist/analyze/__tests__/edge-filters.test.js +0 -66
- package/dist/analyze/__tests__/edge-filters.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 -100
- 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 -160
- 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__/security-fls-filter.test.d.ts +0 -2
- package/dist/analyze/__tests__/security-fls-filter.test.d.ts.map +0 -1
- package/dist/analyze/__tests__/security-fls-filter.test.js +0 -23
- package/dist/analyze/__tests__/security-fls-filter.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__/custom-settings.test.d.ts +0 -2
- package/dist/extractors/live-org/__tests__/custom-settings.test.d.ts.map +0 -1
- package/dist/extractors/live-org/__tests__/custom-settings.test.js +0 -79
- package/dist/extractors/live-org/__tests__/custom-settings.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 -374
- 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 -177
- 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 -78
- 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 -73
- 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__/stop-waiting.test.d.ts +0 -2
- package/dist/extractors/live-org/__tests__/stop-waiting.test.d.ts.map +0 -1
- package/dist/extractors/live-org/__tests__/stop-waiting.test.js +0 -243
- package/dist/extractors/live-org/__tests__/stop-waiting.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/extractors/live-org/__tests__/watchdog-budgets.test.d.ts +0 -2
- package/dist/extractors/live-org/__tests__/watchdog-budgets.test.d.ts.map +0 -1
- package/dist/extractors/live-org/__tests__/watchdog-budgets.test.js +0 -40
- package/dist/extractors/live-org/__tests__/watchdog-budgets.test.js.map +0 -1
- package/dist/extractors/live-org/__tests__/wedge-isolation.test.d.ts +0 -2
- package/dist/extractors/live-org/__tests__/wedge-isolation.test.d.ts.map +0 -1
- package/dist/extractors/live-org/__tests__/wedge-isolation.test.js +0 -270
- package/dist/extractors/live-org/__tests__/wedge-isolation.test.js.map +0 -1
- package/dist/extractors/live-org/extractors/__tests__/apex.test.d.ts +0 -2
- package/dist/extractors/live-org/extractors/__tests__/apex.test.d.ts.map +0 -1
- package/dist/extractors/live-org/extractors/__tests__/apex.test.js +0 -73
- package/dist/extractors/live-org/extractors/__tests__/apex.test.js.map +0 -1
- package/dist/extractors/live-org/extractors/__tests__/lwc.parallel.test.d.ts +0 -2
- package/dist/extractors/live-org/extractors/__tests__/lwc.parallel.test.d.ts.map +0 -1
- package/dist/extractors/live-org/extractors/__tests__/lwc.parallel.test.js +0 -183
- package/dist/extractors/live-org/extractors/__tests__/lwc.parallel.test.js.map +0 -1
- package/dist/ingest/__tests__/config-values.test.d.ts +0 -2
- package/dist/ingest/__tests__/config-values.test.d.ts.map +0 -1
- package/dist/ingest/__tests__/config-values.test.js +0 -65
- package/dist/ingest/__tests__/config-values.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 -207
- 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.detect-deletions-guard.test.d.ts +0 -10
- package/dist/ingest/__tests__/live-ingest.detect-deletions-guard.test.d.ts.map +0 -1
- package/dist/ingest/__tests__/live-ingest.detect-deletions-guard.test.js +0 -251
- package/dist/ingest/__tests__/live-ingest.detect-deletions-guard.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__/parser-dispatch.test.d.ts +0 -2
- package/dist/ingest/__tests__/parser-dispatch.test.d.ts.map +0 -1
- package/dist/ingest/__tests__/parser-dispatch.test.js +0 -55
- package/dist/ingest/__tests__/parser-dispatch.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/ingest/__tests__/vlocity-dispatch-integration.test.d.ts +0 -2
- package/dist/ingest/__tests__/vlocity-dispatch-integration.test.d.ts.map +0 -1
- package/dist/ingest/__tests__/vlocity-dispatch-integration.test.js +0 -134
- package/dist/ingest/__tests__/vlocity-dispatch-integration.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__/datatransform-structured.test.d.ts +0 -2
- package/dist/parsers/__tests__/datatransform-structured.test.d.ts.map +0 -1
- package/dist/parsers/__tests__/datatransform-structured.test.js +0 -147
- package/dist/parsers/__tests__/datatransform-structured.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 -47
- 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 -149
- 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 -53
- 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 -105
- 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 -206
- package/dist/parsers/apex/__tests__/ast-extractor.test.js.map +0 -1
- package/dist/parsers/apex/__tests__/empty-body.test.d.ts +0 -2
- package/dist/parsers/apex/__tests__/empty-body.test.d.ts.map +0 -1
- package/dist/parsers/apex/__tests__/empty-body.test.js +0 -40
- package/dist/parsers/apex/__tests__/empty-body.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 -56
- 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/apex/__tests__/regex-inloop.test.d.ts +0 -2
- package/dist/parsers/apex/__tests__/regex-inloop.test.d.ts.map +0 -1
- package/dist/parsers/apex/__tests__/regex-inloop.test.js +0 -70
- package/dist/parsers/apex/__tests__/regex-inloop.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 -126
- 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 -145
- 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__/sync-generation.test.d.ts +0 -2
- package/dist/storage/__tests__/sync-generation.test.d.ts.map +0 -1
- package/dist/storage/__tests__/sync-generation.test.js +0 -159
- package/dist/storage/__tests__/sync-generation.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,4 +1,52 @@
|
|
|
1
1
|
import type { OrgId, QualifiedName } from "@ryanstark24/sfgraph-shared";
|
|
2
|
+
import type { NodeFact } from "../domain/index.js";
|
|
2
3
|
import type { GraphStore } from "../storage/interfaces.js";
|
|
4
|
+
/**
|
|
5
|
+
* Labels a test class can exercise: `IS_TEST_FOR` only ever targets Apex
|
|
6
|
+
* classes, and an ApexTrigger is exercised through DML from tests. Every
|
|
7
|
+
* other label (LWC, Aura, Flow, FlowVersion, ...) can never be "covered", so
|
|
8
|
+
* it is reported as not applicable rather than as a gap.
|
|
9
|
+
*/
|
|
10
|
+
export declare const COVERAGE_LABELS: ReadonlySet<string>;
|
|
11
|
+
/**
|
|
12
|
+
* True when a test class targets `qname`'s component with IS_TEST_FOR. The
|
|
13
|
+
* edge only targets classes, so a method is resolved to its owning class
|
|
14
|
+
* first (containment.ts `componentOf`).
|
|
15
|
+
*/
|
|
3
16
|
export declare function hasTestCoverage(store: GraphStore, orgId: OrgId, qname: QualifiedName): boolean;
|
|
17
|
+
/** Coverage verdict for one qname, decided on its component (`unit`). */
|
|
18
|
+
export interface CoverageVerdict {
|
|
19
|
+
/** The component coverage is decided on (a method's class, a FlowVersion's Flow). */
|
|
20
|
+
unit: string;
|
|
21
|
+
/** Label of `unit` (node label, else the qname prefix). */
|
|
22
|
+
label: string;
|
|
23
|
+
/** `label` is in COVERAGE_LABELS. */
|
|
24
|
+
applicable: boolean;
|
|
25
|
+
/** `unit` is test code: an `@isTest` class, a class with a test member
|
|
26
|
+
* (TestMethod / `isTest`), or a class with IS_TEST_FOR out-edges. A test
|
|
27
|
+
* method's own node carries no IS_TEST_FOR, so the class decides, and a
|
|
28
|
+
* class and its members always get the same verdict. */
|
|
29
|
+
isTest: boolean;
|
|
30
|
+
/** A test class targets `unit` with IS_TEST_FOR. */
|
|
31
|
+
covered: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Facts from a local (not yet ingested) parse, consulted before the graph:
|
|
35
|
+
* wip tools see added classes, methods and tests the graph does not hold.
|
|
36
|
+
*/
|
|
37
|
+
export interface LocalCoverageFacts {
|
|
38
|
+
nodes?: ReadonlyMap<string, NodeFact>;
|
|
39
|
+
/** member qname -> owner qname (local CONTAINS_METHOD edges). */
|
|
40
|
+
owners?: ReadonlyMap<string, string>;
|
|
41
|
+
/** Lower-cased IS_TEST_FOR targets of local test classes. */
|
|
42
|
+
testTargets?: ReadonlySet<string>;
|
|
43
|
+
/** Lower-cased sources of local IS_TEST_FOR edges. */
|
|
44
|
+
testSources?: ReadonlySet<string>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* A memoised classifier: qname -> its coverage verdict. Used by
|
|
48
|
+
* test_gap_intelligence_from_git_diff, what_broke and wip_test_gap so the
|
|
49
|
+
* three agree on roll-up, test-ness and applicability.
|
|
50
|
+
*/
|
|
51
|
+
export declare function makeCoverageClassifier(store: GraphStore, orgId: OrgId, local?: LocalCoverageFacts): (qname: string) => CoverageVerdict;
|
|
4
52
|
//# sourceMappingURL=test-coverage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-coverage.d.ts","sourceRoot":"","sources":["../../src/analyze/test-coverage.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":"test-coverage.d.ts","sourceRoot":"","sources":["../../src/analyze/test-coverage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAExE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAI3D;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,MAAM,CAAyC,CAAC;AAE1F;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,GAAG,OAAO,CAI9F;AAED,yEAAyE;AACzE,MAAM,WAAW,eAAe;IAC9B,qFAAqF;IACrF,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,UAAU,EAAE,OAAO,CAAC;IACpB;;;6DAGyD;IACzD,MAAM,EAAE,OAAO,CAAC;IAChB,oDAAoD;IACpD,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACtC,iEAAiE;IACjE,MAAM,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,6DAA6D;IAC7D,WAAW,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAClC,sDAAsD;IACtD,WAAW,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACnC;AAOD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,KAAK,EACZ,KAAK,GAAE,kBAAuB,GAC7B,CAAC,KAAK,EAAE,MAAM,KAAK,eAAe,CAgDpC"}
|
|
@@ -1,5 +1,76 @@
|
|
|
1
|
+
import { asQualifiedName } from "@ryanstark24/sfgraph-shared";
|
|
1
2
|
import { REL_TYPES } from "../domain/rel-types.js";
|
|
3
|
+
import { componentOf, listMembers } from "./containment.js";
|
|
4
|
+
import { labelOfQname } from "./edge-filters.js";
|
|
5
|
+
/**
|
|
6
|
+
* Labels a test class can exercise: `IS_TEST_FOR` only ever targets Apex
|
|
7
|
+
* classes, and an ApexTrigger is exercised through DML from tests. Every
|
|
8
|
+
* other label (LWC, Aura, Flow, FlowVersion, ...) can never be "covered", so
|
|
9
|
+
* it is reported as not applicable rather than as a gap.
|
|
10
|
+
*/
|
|
11
|
+
export const COVERAGE_LABELS = new Set(["ApexClass", "ApexTrigger"]);
|
|
12
|
+
/**
|
|
13
|
+
* True when a test class targets `qname`'s component with IS_TEST_FOR. The
|
|
14
|
+
* edge only targets classes, so a method is resolved to its owning class
|
|
15
|
+
* first (containment.ts `componentOf`).
|
|
16
|
+
*/
|
|
2
17
|
export function hasTestCoverage(store, orgId, qname) {
|
|
3
|
-
|
|
18
|
+
const unit = componentOf(store, orgId, qname);
|
|
19
|
+
if (store.listEdgesTo(orgId, unit, REL_TYPES.IS_TEST_FOR).length > 0)
|
|
20
|
+
return true;
|
|
21
|
+
return unit !== qname && store.listEdgesTo(orgId, qname, REL_TYPES.IS_TEST_FOR).length > 0;
|
|
22
|
+
}
|
|
23
|
+
const flaggedTest = (n) => n != null &&
|
|
24
|
+
(n.label === "TestMethod" ||
|
|
25
|
+
n.attributes?.isTest === true);
|
|
26
|
+
/**
|
|
27
|
+
* A memoised classifier: qname -> its coverage verdict. Used by
|
|
28
|
+
* test_gap_intelligence_from_git_diff, what_broke and wip_test_gap so the
|
|
29
|
+
* three agree on roll-up, test-ness and applicability.
|
|
30
|
+
*/
|
|
31
|
+
export function makeCoverageClassifier(store, orgId, local = {}) {
|
|
32
|
+
// Verdicts are per unit (lower-cased), so a class and each of its
|
|
33
|
+
// members get the same answer whichever is asked first.
|
|
34
|
+
const unitMemo = new Map();
|
|
35
|
+
const unitOf = new Map();
|
|
36
|
+
const nodeOf = (q) => local.nodes?.get(q) ?? store.getNode(orgId, asQualifiedName(q));
|
|
37
|
+
const localMembers = (lowerUnit) => [...(local.owners ?? [])].filter(([, o]) => o.toLowerCase() === lowerUnit).map(([m]) => m);
|
|
38
|
+
const verdictFor = (unit) => {
|
|
39
|
+
const lowerUnit = unit.toLowerCase();
|
|
40
|
+
const hit = unitMemo.get(lowerUnit);
|
|
41
|
+
if (hit)
|
|
42
|
+
return hit;
|
|
43
|
+
const unitNode = nodeOf(unit);
|
|
44
|
+
const unitQ = asQualifiedName(unit);
|
|
45
|
+
const label = unitNode?.label ?? labelOfQname(unit);
|
|
46
|
+
// Test-ness folds in the members' flags: a test method marks its class.
|
|
47
|
+
const members = [...listMembers(store, orgId, unitQ).map(String), ...localMembers(lowerUnit)];
|
|
48
|
+
const isTest = flaggedTest(unitNode) ||
|
|
49
|
+
members.some((m) => flaggedTest(nodeOf(m))) ||
|
|
50
|
+
local.testSources?.has(lowerUnit) === true ||
|
|
51
|
+
store.listEdgesFrom(orgId, unitQ, REL_TYPES.IS_TEST_FOR).length > 0;
|
|
52
|
+
const covered = local.testTargets?.has(lowerUnit) === true || hasTestCoverage(store, orgId, unitQ);
|
|
53
|
+
const v = {
|
|
54
|
+
unit,
|
|
55
|
+
label,
|
|
56
|
+
applicable: COVERAGE_LABELS.has(label),
|
|
57
|
+
isTest,
|
|
58
|
+
covered,
|
|
59
|
+
};
|
|
60
|
+
unitMemo.set(lowerUnit, v);
|
|
61
|
+
return v;
|
|
62
|
+
};
|
|
63
|
+
return (qname) => {
|
|
64
|
+
let unit = unitOf.get(qname);
|
|
65
|
+
if (unit === undefined) {
|
|
66
|
+
const rawUnit = local.owners?.get(qname) ?? String(componentOf(store, orgId, asQualifiedName(qname)));
|
|
67
|
+
// The stored spelling: qname lookups ignore case, listings should not
|
|
68
|
+
// hold one component twice.
|
|
69
|
+
const unitNode = nodeOf(rawUnit);
|
|
70
|
+
unit = unitNode ? String(unitNode.qualifiedName) : rawUnit;
|
|
71
|
+
unitOf.set(qname, unit);
|
|
72
|
+
}
|
|
73
|
+
return verdictFor(unit);
|
|
74
|
+
};
|
|
4
75
|
}
|
|
5
76
|
//# sourceMappingURL=test-coverage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-coverage.js","sourceRoot":"","sources":["../../src/analyze/test-coverage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"test-coverage.js","sourceRoot":"","sources":["../../src/analyze/test-coverage.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { Logger } from "@ryanstark24/sfgraph-shared";
|
|
2
|
+
import type { MemberRef } from "../extractors/interfaces/metadata-source.js";
|
|
3
|
+
/** Absolute paths under `root` that differ from HEAD; null when `root` is not
|
|
4
|
+
* inside a git work tree, or when git cannot be run safely there. */
|
|
5
|
+
export declare function gitChangedFiles(root: string, logger?: Logger): Set<string> | null;
|
|
6
|
+
/** Files under `dirs` modified after `sinceMs`. */
|
|
7
|
+
export declare function filesModifiedSince(dirs: string[], sinceMs: number): Set<string>;
|
|
8
|
+
/** Changed files by every available signal; null when no signal is available. */
|
|
9
|
+
export declare function localChangedFiles(opts: {
|
|
10
|
+
projectRoot: string;
|
|
11
|
+
/** Directories the metadata source walks (package dirs, DataPacks). */
|
|
12
|
+
sourceDirs: string[];
|
|
13
|
+
lastSyncedAt: number | null | undefined;
|
|
14
|
+
logger?: Logger;
|
|
15
|
+
}): Set<string> | null;
|
|
16
|
+
/** Filesystem path of a member's `file://` sourceUri. */
|
|
17
|
+
export declare function memberPath(ref: Pick<MemberRef, "sourceUri">): string;
|
|
18
|
+
/** Changed files plus every folder that contains one. */
|
|
19
|
+
export interface ChangeIndex {
|
|
20
|
+
files: ReadonlySet<string>;
|
|
21
|
+
dirs: ReadonlySet<string>;
|
|
22
|
+
}
|
|
23
|
+
export declare function indexChanges(changed: ReadonlySet<string>): ChangeIndex;
|
|
24
|
+
/**
|
|
25
|
+
* Streaming pre-check of one member against the changes, without the other
|
|
26
|
+
* members: `direct` = it owns a changed file by itself (own file, sidecar,
|
|
27
|
+
* a file under a directory member); `maybe` = a changed file sits in a folder
|
|
28
|
+
* it anchors, so ownership depends on whether it is the sole member there
|
|
29
|
+
* (`membersOwningFiles` decides with every ref); `no` = it cannot own one.
|
|
30
|
+
*/
|
|
31
|
+
export declare function classifyMember(ref: Pick<MemberRef, "sourceUri" | "memberName">, idx: ChangeIndex): "direct" | "maybe" | "no";
|
|
32
|
+
/**
|
|
33
|
+
* Which members own the changed files. A member owns:
|
|
34
|
+
* - its source path (a file, or every file under it when it is a directory);
|
|
35
|
+
* - the sidecar of a file member (`Foo.cls` -> `Foo.cls-meta.xml`);
|
|
36
|
+
* - every other file in its folder when it is the only member there (a
|
|
37
|
+
* DataPack folder, an object folder with `fields/`, ...). A folder shared
|
|
38
|
+
* by several members (`classes/`) gives an unowned file to nobody.
|
|
39
|
+
* Returns the indexes of owning members in `refs`. Cost is O(refs + changed
|
|
40
|
+
* x path depth).
|
|
41
|
+
*/
|
|
42
|
+
export declare function membersOwningFiles(refs: ReadonlyArray<Pick<MemberRef, "sourceUri" | "memberName">>, changed: ReadonlySet<string>,
|
|
43
|
+
/** Anchors of members not in `refs`, counted per folder (`selectOwningMembers`). */
|
|
44
|
+
extraAnchors?: ReadonlyMap<string, number>): Set<number>;
|
|
45
|
+
/** What {@link selectOwningMembers} needs of an index entry and of its loaded member. */
|
|
46
|
+
export interface SelectableEntry {
|
|
47
|
+
/** The member's sourceUri. */
|
|
48
|
+
key: string;
|
|
49
|
+
}
|
|
50
|
+
export interface SelectableMember {
|
|
51
|
+
ref: Pick<MemberRef, "sourceUri" | "memberName">;
|
|
52
|
+
}
|
|
53
|
+
export interface OwnerSelection<M> {
|
|
54
|
+
/** Members that own a changed file by themselves, in index order. */
|
|
55
|
+
direct: M[];
|
|
56
|
+
/** Members that own a changed file via a sole-member folder, in `membersOwningFiles` order. */
|
|
57
|
+
owners: M[];
|
|
58
|
+
indexed: number;
|
|
59
|
+
loaded: number;
|
|
60
|
+
/** Paths of loaded members whose load() returned null (unreadable). */
|
|
61
|
+
dropped: ReadonlySet<string>;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The members owning `changed` files, as `membersOwningFiles` over every
|
|
65
|
+
* indexed member would find them, while `load()`ing only the members that can
|
|
66
|
+
* matter, decided from each key (path) with set lookups and a stat at most:
|
|
67
|
+
* - direct: its path or sidecar is a changed file, or it is a folder holding
|
|
68
|
+
* one. Loaded; owns it.
|
|
69
|
+
* - sole: the only member whose own folder (its path for a folder member, its
|
|
70
|
+
* parent for a file) holds a changed file. Loaded; may own via that folder.
|
|
71
|
+
* - shared: its own folder holds a changed file but other members' do too.
|
|
72
|
+
* Not loaded: nobody owns via that folder, and its anchor there is passed
|
|
73
|
+
* to `membersOwningFiles` as a count (`extraAnchors`).
|
|
74
|
+
* - The one remaining role is anchoring the folder above its own when named
|
|
75
|
+
* after it (`memberAnchors`). A member is loaded for that only when a
|
|
76
|
+
* changed file's walk up reaches that folder before any known anchor.
|
|
77
|
+
* Other members can neither own a changed file nor change who owns one.
|
|
78
|
+
* `load` returning null (unreadable) drops the member like `iter()` does; a
|
|
79
|
+
* member never loaded still counts as an anchor of its own folder.
|
|
80
|
+
*/
|
|
81
|
+
export declare function selectOwningMembers<E extends SelectableEntry, M extends SelectableMember>(entries: AsyncIterable<E> | Iterable<E>, changed: ReadonlySet<string>, load: (e: E) => Promise<M | null>): Promise<OwnerSelection<M>>;
|
|
82
|
+
/**
|
|
83
|
+
* Whether a deleted `file` belongs by itself to a member at `memberPaths`: its
|
|
84
|
+
* sidecar's member (`Foo.cls` for `Foo.cls-meta.xml`) or a folder member
|
|
85
|
+
* holding it (a bundle that lost one file).
|
|
86
|
+
*/
|
|
87
|
+
export declare function heldByMember(file: string, memberPaths: ReadonlySet<string>): boolean;
|
|
88
|
+
//# sourceMappingURL=wip-changed-files.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wip-changed-files.d.ts","sourceRoot":"","sources":["../../src/analyze/wip-changed-files.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
import { execFileSync } from "node:child_process";
|
|
2
|
+
import * as fs from "node:fs";
|
|
3
|
+
import * as path from "node:path";
|
|
4
|
+
/**
|
|
5
|
+
* Local-change detection for wip "changed-only" mode, so only changed members
|
|
6
|
+
* are parsed. Two signals, either one marks a file changed:
|
|
7
|
+
* - git: the file differs from HEAD (staged, unstaged or untracked);
|
|
8
|
+
* - mtime: the file was modified after the org's last sync.
|
|
9
|
+
* A signal that is unavailable (not a git work tree, no `lastSyncedAt`) is
|
|
10
|
+
* skipped. With neither signal there is nothing to narrow by and the caller
|
|
11
|
+
* parses every member.
|
|
12
|
+
*/
|
|
13
|
+
const SKIP_DIR_NAMES = new Set(["node_modules", ".git", "dist", "coverage", ".sfdx", ".sf"]);
|
|
14
|
+
/**
|
|
15
|
+
* Config overrides so git never runs a command the repo configures: the
|
|
16
|
+
* project may be an untrusted clone, and its `.git/config` (or one it
|
|
17
|
+
* includes) can name a fsmonitor, hooks, an external diff or textconv, and
|
|
18
|
+
* clean/smudge/process filters that `diff HEAD` runs to re-hash a
|
|
19
|
+
* stat-dirty file. Filters cannot be disabled by pattern, so every driver
|
|
20
|
+
* defined in any config scope is blanked by name (git skips an empty
|
|
21
|
+
* command). Null when a driver name cannot be passed safely via `-c`.
|
|
22
|
+
*/
|
|
23
|
+
function safeGitConfig(root) {
|
|
24
|
+
const base = [
|
|
25
|
+
"-c",
|
|
26
|
+
"core.fsmonitor=false",
|
|
27
|
+
"-c",
|
|
28
|
+
"core.hooksPath=/dev/null",
|
|
29
|
+
"-c",
|
|
30
|
+
"diff.external=",
|
|
31
|
+
"-c",
|
|
32
|
+
"core.attributesFile=/dev/null",
|
|
33
|
+
];
|
|
34
|
+
let names;
|
|
35
|
+
try {
|
|
36
|
+
names = execFileSync("git", [
|
|
37
|
+
"-C",
|
|
38
|
+
root,
|
|
39
|
+
...base,
|
|
40
|
+
"config",
|
|
41
|
+
"--includes",
|
|
42
|
+
"--name-only",
|
|
43
|
+
"-z",
|
|
44
|
+
"--get-regexp",
|
|
45
|
+
"^filter\\..*\\.(clean|smudge|process)$",
|
|
46
|
+
], { encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] });
|
|
47
|
+
}
|
|
48
|
+
catch (e) {
|
|
49
|
+
// Exit status 1: no filter driver configured.
|
|
50
|
+
if (e.status === 1)
|
|
51
|
+
return base;
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
const out = [...base];
|
|
55
|
+
const drivers = new Set();
|
|
56
|
+
for (const key of splitZ(names)) {
|
|
57
|
+
const m = /^filter\.(.+)\.(clean|smudge|process)$/s.exec(key.trim());
|
|
58
|
+
if (!m)
|
|
59
|
+
return null;
|
|
60
|
+
drivers.add(m[1]);
|
|
61
|
+
}
|
|
62
|
+
for (const d of drivers) {
|
|
63
|
+
if (/[=\n\0]/.test(d))
|
|
64
|
+
return null;
|
|
65
|
+
for (const k of ["clean", "smudge", "process"])
|
|
66
|
+
out.push("-c", `filter.${d}.${k}=`);
|
|
67
|
+
out.push("-c", `filter.${d}.required=false`);
|
|
68
|
+
}
|
|
69
|
+
return out;
|
|
70
|
+
}
|
|
71
|
+
function git(root, config, args) {
|
|
72
|
+
try {
|
|
73
|
+
return execFileSync("git", ["-C", root, ...config, ...args], {
|
|
74
|
+
encoding: "utf8",
|
|
75
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
76
|
+
maxBuffer: 256 * 1024 * 1024,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
const splitZ = (s) => s.split("\0").filter((p) => p.length > 0);
|
|
84
|
+
/** Absolute paths under `root` that differ from HEAD; null when `root` is not
|
|
85
|
+
* inside a git work tree, or when git cannot be run safely there. */
|
|
86
|
+
export function gitChangedFiles(root, logger) {
|
|
87
|
+
const abs = path.resolve(root);
|
|
88
|
+
const cfg = safeGitConfig(abs);
|
|
89
|
+
if (!cfg) {
|
|
90
|
+
logger?.debug("wip: git signal skipped (repo config cannot be neutralised safely)", {
|
|
91
|
+
root: abs,
|
|
92
|
+
});
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
if (git(abs, cfg, ["rev-parse", "--is-inside-work-tree"])?.trim() !== "true")
|
|
96
|
+
return null;
|
|
97
|
+
// `--relative` and `ls-files` report paths relative to `root`.
|
|
98
|
+
// `--ignore-submodules`: never inspect (or run git inside) a submodule.
|
|
99
|
+
const tracked = git(abs, cfg, [
|
|
100
|
+
"diff",
|
|
101
|
+
"HEAD",
|
|
102
|
+
"--ignore-submodules",
|
|
103
|
+
"--name-only",
|
|
104
|
+
"--no-renames",
|
|
105
|
+
"--no-ext-diff",
|
|
106
|
+
"--no-textconv",
|
|
107
|
+
"--relative",
|
|
108
|
+
"-z",
|
|
109
|
+
]) ??
|
|
110
|
+
// No HEAD yet (fresh repo): every tracked file is new.
|
|
111
|
+
git(abs, cfg, ["ls-files", "-z"]);
|
|
112
|
+
const untracked = git(abs, cfg, ["ls-files", "--others", "--exclude-standard", "-z"]);
|
|
113
|
+
if (tracked === null || untracked === null)
|
|
114
|
+
return null;
|
|
115
|
+
const out = new Set();
|
|
116
|
+
for (const rel of [...splitZ(tracked), ...splitZ(untracked)])
|
|
117
|
+
out.add(path.join(abs, rel));
|
|
118
|
+
return out;
|
|
119
|
+
}
|
|
120
|
+
/** Files under `dirs` modified after `sinceMs`. */
|
|
121
|
+
export function filesModifiedSince(dirs, sinceMs) {
|
|
122
|
+
const out = new Set();
|
|
123
|
+
const queue = dirs.map((d) => path.resolve(d));
|
|
124
|
+
while (queue.length > 0) {
|
|
125
|
+
const dir = queue.pop();
|
|
126
|
+
let entries;
|
|
127
|
+
try {
|
|
128
|
+
entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
129
|
+
}
|
|
130
|
+
catch {
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
for (const e of entries) {
|
|
134
|
+
const full = path.join(dir, e.name);
|
|
135
|
+
if (e.isDirectory()) {
|
|
136
|
+
if (!SKIP_DIR_NAMES.has(e.name))
|
|
137
|
+
queue.push(full);
|
|
138
|
+
}
|
|
139
|
+
else if (e.isFile()) {
|
|
140
|
+
try {
|
|
141
|
+
if (fs.statSync(full).mtimeMs > sinceMs)
|
|
142
|
+
out.add(full);
|
|
143
|
+
}
|
|
144
|
+
catch {
|
|
145
|
+
/* vanished mid-walk */
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return out;
|
|
151
|
+
}
|
|
152
|
+
/** Changed files by every available signal; null when no signal is available. */
|
|
153
|
+
export function localChangedFiles(opts) {
|
|
154
|
+
const fromGit = gitChangedFiles(opts.projectRoot, opts.logger);
|
|
155
|
+
const fromMtime = typeof opts.lastSyncedAt === "number" && opts.lastSyncedAt > 0
|
|
156
|
+
? filesModifiedSince(opts.sourceDirs, opts.lastSyncedAt)
|
|
157
|
+
: null;
|
|
158
|
+
if (!fromGit && !fromMtime)
|
|
159
|
+
return null;
|
|
160
|
+
return new Set([...(fromGit ?? []), ...(fromMtime ?? [])]);
|
|
161
|
+
}
|
|
162
|
+
/** Filesystem path of a member's `file://` sourceUri. */
|
|
163
|
+
export function memberPath(ref) {
|
|
164
|
+
const uri = ref.sourceUri;
|
|
165
|
+
return path.resolve(uri.startsWith("file://") ? uri.slice("file://".length) : uri);
|
|
166
|
+
}
|
|
167
|
+
const statIsDir = (p) => {
|
|
168
|
+
try {
|
|
169
|
+
return fs.statSync(p).isDirectory();
|
|
170
|
+
}
|
|
171
|
+
catch {
|
|
172
|
+
return false;
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
/** Folders a member anchors at: a directory member at itself, a file member
|
|
176
|
+
* at its folder, and both at the nearest ancestor (up to two levels) named
|
|
177
|
+
* after the member (`objects/Foo/` for a stub `fields/` dir). */
|
|
178
|
+
function memberAnchors(p, isDir, memberName) {
|
|
179
|
+
const own = isDir ? p : path.dirname(p);
|
|
180
|
+
const out = [own];
|
|
181
|
+
let up = own;
|
|
182
|
+
for (let k = 0; k < 2; k++) {
|
|
183
|
+
if (path.basename(up) === memberName) {
|
|
184
|
+
if (up !== own)
|
|
185
|
+
out.push(up);
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
up = path.dirname(up);
|
|
189
|
+
}
|
|
190
|
+
return out;
|
|
191
|
+
}
|
|
192
|
+
export function indexChanges(changed) {
|
|
193
|
+
const files = new Set();
|
|
194
|
+
const dirs = new Set();
|
|
195
|
+
for (const raw of changed) {
|
|
196
|
+
const f = path.resolve(raw);
|
|
197
|
+
files.add(f);
|
|
198
|
+
for (let d = path.dirname(f); !dirs.has(d); d = path.dirname(d)) {
|
|
199
|
+
dirs.add(d);
|
|
200
|
+
if (path.dirname(d) === d)
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
return { files, dirs };
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Streaming pre-check of one member against the changes, without the other
|
|
208
|
+
* members: `direct` = it owns a changed file by itself (own file, sidecar,
|
|
209
|
+
* a file under a directory member); `maybe` = a changed file sits in a folder
|
|
210
|
+
* it anchors, so ownership depends on whether it is the sole member there
|
|
211
|
+
* (`membersOwningFiles` decides with every ref); `no` = it cannot own one.
|
|
212
|
+
*/
|
|
213
|
+
export function classifyMember(ref, idx) {
|
|
214
|
+
const p = memberPath(ref);
|
|
215
|
+
const isDir = statIsDir(p);
|
|
216
|
+
if (isDir ? idx.dirs.has(p) : idx.files.has(p) || idx.files.has(`${p}-meta.xml`)) {
|
|
217
|
+
return "direct";
|
|
218
|
+
}
|
|
219
|
+
return memberAnchors(p, isDir, ref.memberName).some((a) => idx.dirs.has(a)) ? "maybe" : "no";
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Which members own the changed files. A member owns:
|
|
223
|
+
* - its source path (a file, or every file under it when it is a directory);
|
|
224
|
+
* - the sidecar of a file member (`Foo.cls` -> `Foo.cls-meta.xml`);
|
|
225
|
+
* - every other file in its folder when it is the only member there (a
|
|
226
|
+
* DataPack folder, an object folder with `fields/`, ...). A folder shared
|
|
227
|
+
* by several members (`classes/`) gives an unowned file to nobody.
|
|
228
|
+
* Returns the indexes of owning members in `refs`. Cost is O(refs + changed
|
|
229
|
+
* x path depth).
|
|
230
|
+
*/
|
|
231
|
+
export function membersOwningFiles(refs, changed,
|
|
232
|
+
/** Anchors of members not in `refs`, counted per folder (`selectOwningMembers`). */
|
|
233
|
+
extraAnchors) {
|
|
234
|
+
const out = new Set();
|
|
235
|
+
if (changed.size === 0)
|
|
236
|
+
return out;
|
|
237
|
+
const paths = refs.map(memberPath);
|
|
238
|
+
const isDir = paths.map(statIsDir);
|
|
239
|
+
const anchored = new Map();
|
|
240
|
+
const dirMembers = new Map();
|
|
241
|
+
const byPath = new Map();
|
|
242
|
+
const push = (m, k, i) => {
|
|
243
|
+
const list = m.get(k) ?? [];
|
|
244
|
+
if (!list.includes(i))
|
|
245
|
+
list.push(i);
|
|
246
|
+
m.set(k, list);
|
|
247
|
+
};
|
|
248
|
+
paths.forEach((p, i) => {
|
|
249
|
+
for (const a of memberAnchors(p, isDir[i] === true, refs[i]?.memberName))
|
|
250
|
+
push(anchored, a, i);
|
|
251
|
+
if (isDir[i])
|
|
252
|
+
push(dirMembers, p, i);
|
|
253
|
+
else
|
|
254
|
+
byPath.set(p, i);
|
|
255
|
+
});
|
|
256
|
+
for (const raw of changed) {
|
|
257
|
+
const f = path.resolve(raw);
|
|
258
|
+
// Own file or its sidecar (`<file>-meta.xml`).
|
|
259
|
+
const direct = byPath.get(f) ?? byPath.get(f.replace(/-meta\.xml$/, ""));
|
|
260
|
+
if (direct !== undefined) {
|
|
261
|
+
out.add(direct);
|
|
262
|
+
continue;
|
|
263
|
+
}
|
|
264
|
+
// Directory members containing the file (every ancestor folder).
|
|
265
|
+
let hit = false;
|
|
266
|
+
for (let dir = path.dirname(f);; dir = path.dirname(dir)) {
|
|
267
|
+
for (const i of dirMembers.get(dir) ?? []) {
|
|
268
|
+
out.add(i);
|
|
269
|
+
hit = true;
|
|
270
|
+
}
|
|
271
|
+
if (path.dirname(dir) === dir)
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
if (hit)
|
|
275
|
+
continue;
|
|
276
|
+
// Nearest anchoring folder; only a sole member there owns the file.
|
|
277
|
+
for (let dir = path.dirname(f);; dir = path.dirname(dir)) {
|
|
278
|
+
const list = anchored.get(dir);
|
|
279
|
+
const extra = extraAnchors?.get(dir) ?? 0;
|
|
280
|
+
if (list || extra > 0) {
|
|
281
|
+
if (list?.length === 1 && extra === 0)
|
|
282
|
+
out.add(list[0]);
|
|
283
|
+
break;
|
|
284
|
+
}
|
|
285
|
+
if (path.dirname(dir) === dir)
|
|
286
|
+
break;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
return out;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* The members owning `changed` files, as `membersOwningFiles` over every
|
|
293
|
+
* indexed member would find them, while `load()`ing only the members that can
|
|
294
|
+
* matter, decided from each key (path) with set lookups and a stat at most:
|
|
295
|
+
* - direct: its path or sidecar is a changed file, or it is a folder holding
|
|
296
|
+
* one. Loaded; owns it.
|
|
297
|
+
* - sole: the only member whose own folder (its path for a folder member, its
|
|
298
|
+
* parent for a file) holds a changed file. Loaded; may own via that folder.
|
|
299
|
+
* - shared: its own folder holds a changed file but other members' do too.
|
|
300
|
+
* Not loaded: nobody owns via that folder, and its anchor there is passed
|
|
301
|
+
* to `membersOwningFiles` as a count (`extraAnchors`).
|
|
302
|
+
* - The one remaining role is anchoring the folder above its own when named
|
|
303
|
+
* after it (`memberAnchors`). A member is loaded for that only when a
|
|
304
|
+
* changed file's walk up reaches that folder before any known anchor.
|
|
305
|
+
* Other members can neither own a changed file nor change who owns one.
|
|
306
|
+
* `load` returning null (unreadable) drops the member like `iter()` does; a
|
|
307
|
+
* member never loaded still counts as an anchor of its own folder.
|
|
308
|
+
*/
|
|
309
|
+
export async function selectOwningMembers(entries, changed, load) {
|
|
310
|
+
const idx = indexChanges(changed);
|
|
311
|
+
const infos = [];
|
|
312
|
+
const dropped = new Set();
|
|
313
|
+
const ownCount = new Map();
|
|
314
|
+
for await (const e of entries) {
|
|
315
|
+
const p = memberPath({ sourceUri: e.key });
|
|
316
|
+
const parent = path.dirname(p);
|
|
317
|
+
let direct = false;
|
|
318
|
+
let own = null;
|
|
319
|
+
let up = path.dirname(parent);
|
|
320
|
+
if (idx.dirs.has(p)) {
|
|
321
|
+
direct = true;
|
|
322
|
+
own = p;
|
|
323
|
+
up = parent;
|
|
324
|
+
}
|
|
325
|
+
else if (idx.files.has(p) || idx.files.has(`${p}-meta.xml`)) {
|
|
326
|
+
direct = true;
|
|
327
|
+
if (statIsDir(p))
|
|
328
|
+
up = parent;
|
|
329
|
+
else
|
|
330
|
+
own = idx.dirs.has(parent) ? parent : null;
|
|
331
|
+
}
|
|
332
|
+
else if (idx.dirs.has(parent)) {
|
|
333
|
+
// A folder member here holds no change (own folder = itself).
|
|
334
|
+
if (statIsDir(p))
|
|
335
|
+
up = parent;
|
|
336
|
+
else
|
|
337
|
+
own = parent;
|
|
338
|
+
}
|
|
339
|
+
// Else: own folder (parent, or p for a folder) holds no change, and a
|
|
340
|
+
// folder member's upper anchor (parent) holds none either; treating it
|
|
341
|
+
// as a file only widens `up`, a superset.
|
|
342
|
+
if (own)
|
|
343
|
+
ownCount.set(own, (ownCount.get(own) ?? 0) + 1);
|
|
344
|
+
infos.push({ e, p, direct, own, up, loaded: false });
|
|
345
|
+
}
|
|
346
|
+
const refs = [];
|
|
347
|
+
const direct = [];
|
|
348
|
+
const pending = new Map();
|
|
349
|
+
const take = async (info) => {
|
|
350
|
+
info.loaded = true;
|
|
351
|
+
const m = await load(info.e);
|
|
352
|
+
if (!m) {
|
|
353
|
+
dropped.add(info.p);
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
const i = refs.push(m) - 1;
|
|
357
|
+
const kind = classifyMember(m.ref, idx);
|
|
358
|
+
if (kind === "direct")
|
|
359
|
+
direct.push(m);
|
|
360
|
+
else if (kind === "maybe")
|
|
361
|
+
pending.set(i, m);
|
|
362
|
+
};
|
|
363
|
+
for (const info of infos) {
|
|
364
|
+
if (info.direct || (info.own !== null && ownCount.get(info.own) === 1))
|
|
365
|
+
await take(info);
|
|
366
|
+
}
|
|
367
|
+
// Folders a changed file's walk up passes before (and including) the
|
|
368
|
+
// first folder known to be anchored.
|
|
369
|
+
const anchoredDirs = new Set(ownCount.keys());
|
|
370
|
+
for (const m of refs) {
|
|
371
|
+
const p = memberPath(m.ref);
|
|
372
|
+
for (const a of memberAnchors(p, statIsDir(p), m.ref.memberName))
|
|
373
|
+
anchoredDirs.add(a);
|
|
374
|
+
}
|
|
375
|
+
const open = new Set();
|
|
376
|
+
for (const raw of changed) {
|
|
377
|
+
for (let dir = path.dirname(path.resolve(raw));; dir = path.dirname(dir)) {
|
|
378
|
+
open.add(dir);
|
|
379
|
+
if (anchoredDirs.has(dir) || path.dirname(dir) === dir)
|
|
380
|
+
break;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
for (const info of infos) {
|
|
384
|
+
if (!info.loaded && idx.dirs.has(info.up) && open.has(info.up))
|
|
385
|
+
await take(info);
|
|
386
|
+
}
|
|
387
|
+
const extra = new Map();
|
|
388
|
+
for (const info of infos) {
|
|
389
|
+
if (!info.loaded && info.own)
|
|
390
|
+
extra.set(info.own, (extra.get(info.own) ?? 0) + 1);
|
|
391
|
+
}
|
|
392
|
+
const owners = [];
|
|
393
|
+
for (const i of membersOwningFiles(refs.map((m) => m.ref), changed, extra)) {
|
|
394
|
+
const m = pending.get(i);
|
|
395
|
+
if (m)
|
|
396
|
+
owners.push(m);
|
|
397
|
+
}
|
|
398
|
+
return {
|
|
399
|
+
direct,
|
|
400
|
+
owners,
|
|
401
|
+
indexed: infos.length,
|
|
402
|
+
loaded: infos.filter((i) => i.loaded).length,
|
|
403
|
+
dropped,
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Whether a deleted `file` belongs by itself to a member at `memberPaths`: its
|
|
408
|
+
* sidecar's member (`Foo.cls` for `Foo.cls-meta.xml`) or a folder member
|
|
409
|
+
* holding it (a bundle that lost one file).
|
|
410
|
+
*/
|
|
411
|
+
export function heldByMember(file, memberPaths) {
|
|
412
|
+
const f = path.resolve(file);
|
|
413
|
+
if (memberPaths.has(f) || memberPaths.has(f.replace(/-meta\.xml$/, "")))
|
|
414
|
+
return true;
|
|
415
|
+
for (let dir = path.dirname(f);; dir = path.dirname(dir)) {
|
|
416
|
+
if (memberPaths.has(dir))
|
|
417
|
+
return true;
|
|
418
|
+
if (path.dirname(dir) === dir)
|
|
419
|
+
return false;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
//# sourceMappingURL=wip-changed-files.js.map
|