@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
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { APEX_PLATFORM_NAMESPACES } from "../domain/apex-platform.js";
|
|
2
|
+
/** The one shared list lives in domain/apex-platform.ts (the parser uses it too). */
|
|
3
|
+
export { APEX_PLATFORM_NAMESPACES };
|
|
4
|
+
/**
|
|
5
|
+
* The dangling-edge audit's platform set: the ORIGINAL 76-entry core list,
|
|
6
|
+
* deliberately narrower than `APEX_PLATFORM_NAMESPACES` (the parser's
|
|
7
|
+
* 200-entry superset). The audit decides whether a dangling ApexClass /
|
|
8
|
+
* ApexInterface / ApexMethod target is an expected platform ref or a missing
|
|
9
|
+
* org class; the superset holds common words (Location, Request, Domain,
|
|
10
|
+
* Page, ...) that are also typical user class names, and calling those
|
|
11
|
+
* "expected platform" would hide real missing classes. The trace pseudo
|
|
12
|
+
* filter keeps the superset because it also requires that no org class of
|
|
13
|
+
* that name exists (`hasClass`). Lower-cased.
|
|
14
|
+
*/
|
|
15
|
+
export declare const AUDIT_PLATFORM_CORE: ReadonlySet<string>;
|
|
16
|
+
/**
|
|
17
|
+
* True for an ApexClass / ApexInterface / ApexMethod qname whose class part
|
|
18
|
+
* is an Apex platform class or namespace (`ApexMethod:Database.query(1)`,
|
|
19
|
+
* `ApexClass:System`). Name-only: callers that can see the node row should
|
|
20
|
+
* also require that it has none.
|
|
21
|
+
*/
|
|
22
|
+
export declare function isApexPlatformQname(qname: string): boolean;
|
|
23
|
+
//# sourceMappingURL=apex-platform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apex-platform.d.ts","sourceRoot":"","sources":["../../src/analyze/apex-platform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,qFAAqF;AACrF,OAAO,EAAE,wBAAwB,EAAE,CAAC;AAEpC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,MAAM,CA+EnD,CAAC;AAOF;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAM1D"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { APEX_PLATFORM_NAMESPACES } from "../domain/apex-platform.js";
|
|
2
|
+
/** The one shared list lives in domain/apex-platform.ts (the parser uses it too). */
|
|
3
|
+
export { APEX_PLATFORM_NAMESPACES };
|
|
4
|
+
/**
|
|
5
|
+
* The dangling-edge audit's platform set: the ORIGINAL 76-entry core list,
|
|
6
|
+
* deliberately narrower than `APEX_PLATFORM_NAMESPACES` (the parser's
|
|
7
|
+
* 200-entry superset). The audit decides whether a dangling ApexClass /
|
|
8
|
+
* ApexInterface / ApexMethod target is an expected platform ref or a missing
|
|
9
|
+
* org class; the superset holds common words (Location, Request, Domain,
|
|
10
|
+
* Page, ...) that are also typical user class names, and calling those
|
|
11
|
+
* "expected platform" would hide real missing classes. The trace pseudo
|
|
12
|
+
* filter keeps the superset because it also requires that no org class of
|
|
13
|
+
* that name exists (`hasClass`). Lower-cased.
|
|
14
|
+
*/
|
|
15
|
+
export const AUDIT_PLATFORM_CORE = new Set([
|
|
16
|
+
"System",
|
|
17
|
+
"Assert",
|
|
18
|
+
"Database",
|
|
19
|
+
"Schema",
|
|
20
|
+
"Test",
|
|
21
|
+
"Limits",
|
|
22
|
+
"UserInfo",
|
|
23
|
+
"Math",
|
|
24
|
+
"String",
|
|
25
|
+
"Integer",
|
|
26
|
+
"Long",
|
|
27
|
+
"Decimal",
|
|
28
|
+
"Double",
|
|
29
|
+
"Boolean",
|
|
30
|
+
"Date",
|
|
31
|
+
"Datetime",
|
|
32
|
+
"Time",
|
|
33
|
+
"TimeZone",
|
|
34
|
+
"Blob",
|
|
35
|
+
"Id",
|
|
36
|
+
"Object",
|
|
37
|
+
"List",
|
|
38
|
+
"Map",
|
|
39
|
+
"Set",
|
|
40
|
+
"JSON",
|
|
41
|
+
"JSONParser",
|
|
42
|
+
"JSONGenerator",
|
|
43
|
+
"Type",
|
|
44
|
+
"Url",
|
|
45
|
+
"Pattern",
|
|
46
|
+
"Matcher",
|
|
47
|
+
"Crypto",
|
|
48
|
+
"EncodingUtil",
|
|
49
|
+
"Http",
|
|
50
|
+
"HttpRequest",
|
|
51
|
+
"HttpResponse",
|
|
52
|
+
"Messaging",
|
|
53
|
+
"ApexPages",
|
|
54
|
+
"PageReference",
|
|
55
|
+
"Site",
|
|
56
|
+
"Network",
|
|
57
|
+
"Label",
|
|
58
|
+
"Approval",
|
|
59
|
+
"Auth",
|
|
60
|
+
"Cache",
|
|
61
|
+
"ConnectApi",
|
|
62
|
+
"EventBus",
|
|
63
|
+
"Flow",
|
|
64
|
+
"Process",
|
|
65
|
+
"QuickAction",
|
|
66
|
+
"Search",
|
|
67
|
+
"Security",
|
|
68
|
+
"Trigger",
|
|
69
|
+
"Exception",
|
|
70
|
+
"DmlException",
|
|
71
|
+
"QueryException",
|
|
72
|
+
"Dom",
|
|
73
|
+
"XmlStreamReader",
|
|
74
|
+
"XmlStreamWriter",
|
|
75
|
+
"SObject",
|
|
76
|
+
"SObjectType",
|
|
77
|
+
"SObjectField",
|
|
78
|
+
"DescribeSObjectResult",
|
|
79
|
+
"DescribeFieldResult",
|
|
80
|
+
"Queueable",
|
|
81
|
+
"Schedulable",
|
|
82
|
+
"Batchable",
|
|
83
|
+
"Iterable",
|
|
84
|
+
"Iterator",
|
|
85
|
+
"Comparable",
|
|
86
|
+
"Callable",
|
|
87
|
+
"Savepoint",
|
|
88
|
+
"Reports",
|
|
89
|
+
"Metadata",
|
|
90
|
+
"Canvas",
|
|
91
|
+
"Invocable",
|
|
92
|
+
].map((c) => c.toLowerCase()));
|
|
93
|
+
/** First dotted segment of a qname's name part (`ApexMethod:System.debug(1)` -> `System`). */
|
|
94
|
+
function headOfName(name) {
|
|
95
|
+
return name.split(/[.(]/, 1)[0] ?? name;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* True for an ApexClass / ApexInterface / ApexMethod qname whose class part
|
|
99
|
+
* is an Apex platform class or namespace (`ApexMethod:Database.query(1)`,
|
|
100
|
+
* `ApexClass:System`). Name-only: callers that can see the node row should
|
|
101
|
+
* also require that it has none.
|
|
102
|
+
*/
|
|
103
|
+
export function isApexPlatformQname(qname) {
|
|
104
|
+
const i = qname.indexOf(":");
|
|
105
|
+
if (i <= 0)
|
|
106
|
+
return false;
|
|
107
|
+
const label = qname.slice(0, i);
|
|
108
|
+
if (label !== "ApexClass" && label !== "ApexInterface" && label !== "ApexMethod")
|
|
109
|
+
return false;
|
|
110
|
+
return APEX_PLATFORM_NAMESPACES.has(headOfName(qname.slice(i + 1)).toLowerCase());
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=apex-platform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apex-platform.js","sourceRoot":"","sources":["../../src/analyze/apex-platform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,qFAAqF;AACrF,OAAO,EAAE,wBAAwB,EAAE,CAAC;AAEpC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAwB,IAAI,GAAG,CAC7D;IACE,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,UAAU;IACV,MAAM;IACN,QAAQ;IACR,SAAS;IACT,MAAM;IACN,SAAS;IACT,QAAQ;IACR,SAAS;IACT,MAAM;IACN,UAAU;IACV,MAAM;IACN,UAAU;IACV,MAAM;IACN,IAAI;IACJ,QAAQ;IACR,MAAM;IACN,KAAK;IACL,KAAK;IACL,MAAM;IACN,YAAY;IACZ,eAAe;IACf,MAAM;IACN,KAAK;IACL,SAAS;IACT,SAAS;IACT,QAAQ;IACR,cAAc;IACd,MAAM;IACN,aAAa;IACb,cAAc;IACd,WAAW;IACX,WAAW;IACX,eAAe;IACf,MAAM;IACN,SAAS;IACT,OAAO;IACP,UAAU;IACV,MAAM;IACN,OAAO;IACP,YAAY;IACZ,UAAU;IACV,MAAM;IACN,SAAS;IACT,aAAa;IACb,QAAQ;IACR,UAAU;IACV,SAAS;IACT,WAAW;IACX,cAAc;IACd,gBAAgB;IAChB,KAAK;IACL,iBAAiB;IACjB,iBAAiB;IACjB,SAAS;IACT,aAAa;IACb,cAAc;IACd,uBAAuB;IACvB,qBAAqB;IACrB,WAAW;IACX,aAAa;IACb,WAAW;IACX,UAAU;IACV,UAAU;IACV,YAAY;IACZ,UAAU;IACV,WAAW;IACX,SAAS;IACT,UAAU;IACV,QAAQ;IACR,WAAW;CACZ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAC9B,CAAC;AAEF,8FAA8F;AAC9F,SAAS,UAAU,CAAC,IAAY;IAC9B,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;AAC1C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAa;IAC/C,MAAM,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC7B,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IACzB,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAChC,IAAI,KAAK,KAAK,WAAW,IAAI,KAAK,KAAK,eAAe,IAAI,KAAK,KAAK,YAAY;QAAE,OAAO,KAAK,CAAC;IAC/F,OAAO,wBAAwB,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AACpF,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { OrgId } from "@ryanstark24/sfgraph-shared";
|
|
2
|
-
import type
|
|
2
|
+
import { type EdgeFact } from "../domain/index.js";
|
|
3
3
|
import type { GraphStore } from "../storage/interfaces.js";
|
|
4
4
|
/**
|
|
5
5
|
* Edges whose `dst` qualified name has no matching node row. Surfaced
|
|
@@ -25,6 +25,16 @@ export interface DanglingEdgeSample {
|
|
|
25
25
|
export interface AuditResult {
|
|
26
26
|
totalEdges: number;
|
|
27
27
|
danglingCount: number;
|
|
28
|
+
/** Dangling edges whose dst can never have a source in the org's own
|
|
29
|
+
* metadata (`isPlatformBuiltinRef`): standard tabs, standard objects and
|
|
30
|
+
* fields, managed-package metadata and Apex platform classes.
|
|
31
|
+
* These are *expected* — the reference data is real and useful (e.g.
|
|
32
|
+
* profile tab visibility), the target just isn't org metadata. Included
|
|
33
|
+
* in `danglingCount`; broken out so the headline number isn't dominated
|
|
34
|
+
* by ~60k standard-tab grants on a vanilla org. */
|
|
35
|
+
platformRefCount: number;
|
|
36
|
+
/** danglingCount - platformRefCount: the subset worth investigating. */
|
|
37
|
+
unexpectedCount: number;
|
|
28
38
|
byRel: Record<string, number>;
|
|
29
39
|
byDstPrefix: Record<string, number>;
|
|
30
40
|
sample: DanglingEdgeSample[];
|
|
@@ -35,14 +45,52 @@ export interface AuditOpts {
|
|
|
35
45
|
/** Hard upper bound on rows scanned per edge table. Default unlimited. */
|
|
36
46
|
scanLimit?: number;
|
|
37
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Namespaces the refs themselves use in `<ns>__Name` form (any dotted
|
|
50
|
+
* segment of the name). Apex writes a managed type as `ns.Type`
|
|
51
|
+
* (`vlocity_cmt.VlocityOpenInterface`), which is not distinguishable from an
|
|
52
|
+
* inner class `Outer.Inner` by syntax alone; a head the same org also uses as
|
|
53
|
+
* `ns__` is a namespace.
|
|
54
|
+
*/
|
|
55
|
+
export declare function namespacesIn(dsts: Iterable<string>): Set<string>;
|
|
56
|
+
/** True when a dangling dst names something no extractor of the org's own
|
|
57
|
+
* source can ever materialize:
|
|
58
|
+
* - standard tabs (`CustomTab:standard-*`);
|
|
59
|
+
* - standard-schema objects (no custom suffix) and their unsuffixed fields;
|
|
60
|
+
* on a custom object only its real standard fields (`X__c.Name`,
|
|
61
|
+
* `X__c.OwnerId`, `Y__mdt.DeveloperName`, ...);
|
|
62
|
+
* - managed-package metadata (`<ns>__Name`, `<ns>__Obj__c.<ns>__F__c`, and
|
|
63
|
+
* `ns.Type` for a namespace in `knownNamespaces` or the
|
|
64
|
+
* `%vlocity_namespace%` placeholder);
|
|
65
|
+
* - Apex platform classes and calls into them (`System.assertEquals`,
|
|
66
|
+
* `Assert.areEqual`);
|
|
67
|
+
* - standard DOM events (`LWCEvent:click`).
|
|
68
|
+
* Custom-suffixed, unnamespaced targets are NEVER platform refs — a missing
|
|
69
|
+
* `__c` target is a real gap worth surfacing — and neither is an empty
|
|
70
|
+
* object or field name, which is a parser bug (`CustomObject:`). */
|
|
71
|
+
export declare function isPlatformBuiltinRef(dst: string, knownNamespaces?: ReadonlySet<string>, customSettings?: ReadonlySet<string>): boolean;
|
|
72
|
+
/** Edge-level classification: `isPlatformBuiltinRef` on the target, plus
|
|
73
|
+
* what only the edge knows. A `lightning-*` tag is a base component
|
|
74
|
+
* (`LWC:button` from `<lightning-button>`); an `IS_TEST_FOR` target is
|
|
75
|
+
* always an org class, so a dangling one is a parser gap even when its name
|
|
76
|
+
* is a platform class (`ApexClass:Test` from `Test.startTest()`). */
|
|
77
|
+
export declare function isExpectedDanglingEdge(e: Pick<EdgeFact, "relType" | "dstQualifiedName" | "attributes">, knownNamespaces?: ReadonlySet<string>, customSettings?: ReadonlySet<string>): boolean;
|
|
38
78
|
export declare function auditDanglingEdges(store: GraphStore, orgIdIn: OrgId | string, opts?: AuditOpts): AuditResult;
|
|
39
79
|
/**
|
|
40
|
-
* Destructive companion to `auditDanglingEdges`: deletes
|
|
80
|
+
* Destructive companion to `auditDanglingEdges`: deletes dangling edges.
|
|
41
81
|
* Reserved for the CLI `--delete-dangling --yes` flag; callers must own the
|
|
42
82
|
* authorization decision (we just do the work).
|
|
83
|
+
*
|
|
84
|
+
* Platform-builtin references (standard-tab grants, standard-schema field
|
|
85
|
+
* grants) are KEPT by default — they're real, queryable security data whose
|
|
86
|
+
* target simply has no metadata source. Pass `includePlatformRefs: true` to
|
|
87
|
+
* delete those too.
|
|
43
88
|
*/
|
|
44
|
-
export declare function deleteDanglingEdges(store: GraphStore, orgIdIn: OrgId | string
|
|
89
|
+
export declare function deleteDanglingEdges(store: GraphStore, orgIdIn: OrgId | string, opts?: {
|
|
90
|
+
includePlatformRefs?: boolean;
|
|
91
|
+
}): {
|
|
45
92
|
deleted: number;
|
|
93
|
+
keptPlatformRefs: number;
|
|
46
94
|
};
|
|
47
95
|
export type { EdgeFact };
|
|
48
96
|
//# sourceMappingURL=audit-graph.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-graph.d.ts","sourceRoot":"","sources":["../../src/analyze/audit-graph.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAiB,MAAM,6BAA6B,CAAC;AACxE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"audit-graph.d.ts","sourceRoot":"","sources":["../../src/analyze/audit-graph.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAiB,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,KAAK,QAAQ,EAA2B,MAAM,oBAAoB,CAAC;AAC5E,OAAO,KAAK,EAAmB,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAG5E;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB;;;;;;wDAMoD;IACpD,gBAAgB,EAAE,MAAM,CAAC;IACzB,wEAAwE;IACxE,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,MAAM,EAAE,kBAAkB,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,SAAS;IACxB,+DAA+D;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAkED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAUhE;AA6GD;;;;;;;;;;;;;;qEAcqE;AACrE,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,MAAM,EACX,eAAe,GAAE,WAAW,CAAC,MAAM,CAAa,EAChD,cAAc,GAAE,WAAW,CAAC,MAAM,CAAa,GAC9C,OAAO,CAyCT;AAED;;;;sEAIsE;AACtE,wBAAgB,sBAAsB,CACpC,CAAC,EAAE,IAAI,CAAC,QAAQ,EAAE,SAAS,GAAG,kBAAkB,GAAG,YAAY,CAAC,EAChE,eAAe,GAAE,WAAW,CAAC,MAAM,CAAa,EAChD,cAAc,GAAE,WAAW,CAAC,MAAM,CAAa,GAC9C,OAAO,CAKT;AA0DD,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,KAAK,GAAG,MAAM,EACvB,IAAI,GAAE,SAAc,GACnB,WAAW,CA2Eb;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,KAAK,GAAG,MAAM,EACvB,IAAI,GAAE;IAAE,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAAO,GAC3C;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAA;CAAE,CAqB/C;AAED,YAAY,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1,50 +1,418 @@
|
|
|
1
|
-
import { asOrgId } from "@ryanstark24/sfgraph-shared";
|
|
1
|
+
import { asOrgId, asQualifiedName } from "@ryanstark24/sfgraph-shared";
|
|
2
|
+
import { REL_TYPES } from "../domain/index.js";
|
|
3
|
+
import { AUDIT_PLATFORM_CORE } from "./apex-platform.js";
|
|
2
4
|
function prefix(qname) {
|
|
3
5
|
const idx = qname.indexOf(":");
|
|
4
6
|
return idx > 0 ? qname.slice(0, idx) : "(unlabeled)";
|
|
5
7
|
}
|
|
8
|
+
const CUSTOM_SUFFIX_RE = /__(?:c|e|b|mdt|x|kav)$/i;
|
|
9
|
+
/** The DataPack namespace placeholder, in `__` and dotted form alike. */
|
|
10
|
+
const NS_PLACEHOLDER = "%vlocity_namespace%";
|
|
11
|
+
const NS_IDENT_RE = /^(?:%vlocity_namespace%|[A-Za-z][A-Za-z0-9]*(?:_[A-Za-z0-9]+)*)$/i;
|
|
12
|
+
const NAME_SEG_RE = /^[A-Za-z0-9]/;
|
|
13
|
+
/** Suffixes of a named member (`ns__Name__c`, `ns__Parent__r`, `ns__Ext__x`). */
|
|
14
|
+
const MEMBER_SUFFIXES = new Set(["c", "r", "x", "mdt", "e", "b", "kav"]);
|
|
15
|
+
/** Tails that make a single-segment `X__tail` an unmanaged name: the member
|
|
16
|
+
* suffixes plus relationship, geolocation and derived-object tails
|
|
17
|
+
* (`CaseId__r`, `Loc__s`, `Foo__History`, `Foo__Share`, `City__cy`). */
|
|
18
|
+
const UNMANAGED_TAILS = new Set([
|
|
19
|
+
...MEMBER_SUFFIXES,
|
|
20
|
+
"s",
|
|
21
|
+
"share",
|
|
22
|
+
"history",
|
|
23
|
+
"feed",
|
|
24
|
+
"changeevent",
|
|
25
|
+
"tag",
|
|
26
|
+
"cy",
|
|
27
|
+
]);
|
|
28
|
+
/** `name` split at `__` when its head is a namespace-shaped identifier. */
|
|
29
|
+
function managedParts(name) {
|
|
30
|
+
const segs = name.split("__");
|
|
31
|
+
if (segs.length < 2)
|
|
32
|
+
return null;
|
|
33
|
+
if (!NS_IDENT_RE.test(segs[0] ?? ""))
|
|
34
|
+
return null;
|
|
35
|
+
if (!segs.slice(1).every((x) => NAME_SEG_RE.test(x)))
|
|
36
|
+
return null;
|
|
37
|
+
return segs;
|
|
38
|
+
}
|
|
39
|
+
/** A managed-package name: `<ns>__Name`, or `<ns>__Name__<tail>`. Unmanaged
|
|
40
|
+
* API names carry `__` only before a suffix (Apex identifiers cannot contain
|
|
41
|
+
* `__` at all), so a single-segment `X__tail` is unmanaged when the tail is a
|
|
42
|
+
* member, relationship or derived-object suffix (`CaseId__r`, `Foo__History`).
|
|
43
|
+
* `%vlocity_namespace%` is the DataPack placeholder for the Vlocity one. */
|
|
44
|
+
function isNamespaced(name) {
|
|
45
|
+
const segs = managedParts(name);
|
|
46
|
+
if (!segs)
|
|
47
|
+
return false;
|
|
48
|
+
if (segs.length >= 3)
|
|
49
|
+
return true;
|
|
50
|
+
if ((segs[0] ?? "").toLowerCase() === NS_PLACEHOLDER)
|
|
51
|
+
return true;
|
|
52
|
+
return !UNMANAGED_TAILS.has((segs[1] ?? "").toLowerCase());
|
|
53
|
+
}
|
|
54
|
+
/** The namespace a name proves, lower-cased, or null. Only the strict member
|
|
55
|
+
* form counts: `ns__Name__<suffix>` with a member suffix (`__c`, `__r`,
|
|
56
|
+
* `__x`, `__mdt`, ...), or the placeholder. */
|
|
57
|
+
function namespaceOf(name) {
|
|
58
|
+
const segs = managedParts(name);
|
|
59
|
+
if (!segs)
|
|
60
|
+
return null;
|
|
61
|
+
const ns = (segs[0] ?? "").toLowerCase();
|
|
62
|
+
if (ns === NS_PLACEHOLDER)
|
|
63
|
+
return ns;
|
|
64
|
+
if (segs.length !== 3)
|
|
65
|
+
return null;
|
|
66
|
+
return MEMBER_SUFFIXES.has((segs[2] ?? "").toLowerCase()) ? ns : null;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Namespaces the refs themselves use in `<ns>__Name` form (any dotted
|
|
70
|
+
* segment of the name). Apex writes a managed type as `ns.Type`
|
|
71
|
+
* (`vlocity_cmt.VlocityOpenInterface`), which is not distinguishable from an
|
|
72
|
+
* inner class `Outer.Inner` by syntax alone; a head the same org also uses as
|
|
73
|
+
* `ns__` is a namespace.
|
|
74
|
+
*/
|
|
75
|
+
export function namespacesIn(dsts) {
|
|
76
|
+
const out = new Set();
|
|
77
|
+
for (const dst of dsts) {
|
|
78
|
+
const name = dst.slice(dst.indexOf(":") + 1);
|
|
79
|
+
for (const seg of name.split(".")) {
|
|
80
|
+
const ns = namespaceOf(seg);
|
|
81
|
+
if (ns)
|
|
82
|
+
out.add(ns);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return out;
|
|
86
|
+
}
|
|
87
|
+
/** Standard fields every custom object has (`X__c.Name`); any other
|
|
88
|
+
* unsuffixed field on a custom object is a parser or source gap. */
|
|
89
|
+
const CUSTOM_OBJECT_STANDARD_FIELDS = [
|
|
90
|
+
"id",
|
|
91
|
+
"name",
|
|
92
|
+
"ownerid",
|
|
93
|
+
"createddate",
|
|
94
|
+
"createdbyid",
|
|
95
|
+
"lastmodifieddate",
|
|
96
|
+
"lastmodifiedbyid",
|
|
97
|
+
"systemmodstamp",
|
|
98
|
+
"isdeleted",
|
|
99
|
+
"recordtypeid",
|
|
100
|
+
"currencyisocode",
|
|
101
|
+
];
|
|
102
|
+
/** Extra standard fields by custom suffix (custom metadata types, platform
|
|
103
|
+
* events, external objects). */
|
|
104
|
+
const STANDARD_FIELDS_BY_SUFFIX = {
|
|
105
|
+
c: new Set(CUSTOM_OBJECT_STANDARD_FIELDS),
|
|
106
|
+
// Custom metadata types: their own fields plus the system audit fields; no
|
|
107
|
+
// owner, record type or Name.
|
|
108
|
+
mdt: new Set([
|
|
109
|
+
"id",
|
|
110
|
+
"createdbyid",
|
|
111
|
+
"createddate",
|
|
112
|
+
"lastmodifiedbyid",
|
|
113
|
+
"lastmodifieddate",
|
|
114
|
+
"systemmodstamp",
|
|
115
|
+
"developername",
|
|
116
|
+
"masterlabel",
|
|
117
|
+
"label",
|
|
118
|
+
"namespaceprefix",
|
|
119
|
+
"qualifiedapiname",
|
|
120
|
+
"language",
|
|
121
|
+
]),
|
|
122
|
+
e: new Set([...CUSTOM_OBJECT_STANDARD_FIELDS, "replayid", "eventuuid"]),
|
|
123
|
+
x: new Set([...CUSTOM_OBJECT_STANDARD_FIELDS, "externalid", "displayurl"]),
|
|
124
|
+
};
|
|
125
|
+
/** Standard DOM events (`onclick`, `addEventListener('change')`): they
|
|
126
|
+
* never have a source in the org. Custom event names stay unexpected. */
|
|
127
|
+
const DOM_EVENTS = new Set([
|
|
128
|
+
"click",
|
|
129
|
+
"dblclick",
|
|
130
|
+
"contextmenu",
|
|
131
|
+
"mousedown",
|
|
132
|
+
"mouseup",
|
|
133
|
+
"mouseover",
|
|
134
|
+
"mouseout",
|
|
135
|
+
"mouseenter",
|
|
136
|
+
"mouseleave",
|
|
137
|
+
"mousemove",
|
|
138
|
+
"wheel",
|
|
139
|
+
"keydown",
|
|
140
|
+
"keyup",
|
|
141
|
+
"keypress",
|
|
142
|
+
"focus",
|
|
143
|
+
"blur",
|
|
144
|
+
"focusin",
|
|
145
|
+
"focusout",
|
|
146
|
+
"input",
|
|
147
|
+
"change",
|
|
148
|
+
"submit",
|
|
149
|
+
"reset",
|
|
150
|
+
"select",
|
|
151
|
+
"scroll",
|
|
152
|
+
"resize",
|
|
153
|
+
"load",
|
|
154
|
+
"error",
|
|
155
|
+
"abort",
|
|
156
|
+
"drag",
|
|
157
|
+
"dragstart",
|
|
158
|
+
"dragend",
|
|
159
|
+
"dragenter",
|
|
160
|
+
"dragleave",
|
|
161
|
+
"dragover",
|
|
162
|
+
"drop",
|
|
163
|
+
"touchstart",
|
|
164
|
+
"touchend",
|
|
165
|
+
"touchmove",
|
|
166
|
+
"touchcancel",
|
|
167
|
+
"pointerdown",
|
|
168
|
+
"pointerup",
|
|
169
|
+
"pointermove",
|
|
170
|
+
"pointerover",
|
|
171
|
+
"pointerout",
|
|
172
|
+
"pointerenter",
|
|
173
|
+
"pointerleave",
|
|
174
|
+
"pointercancel",
|
|
175
|
+
"copy",
|
|
176
|
+
"cut",
|
|
177
|
+
"paste",
|
|
178
|
+
"animationstart",
|
|
179
|
+
"animationend",
|
|
180
|
+
"animationiteration",
|
|
181
|
+
"transitionend",
|
|
182
|
+
"invalid",
|
|
183
|
+
"toggle",
|
|
184
|
+
"beforeinput",
|
|
185
|
+
"compositionstart",
|
|
186
|
+
"compositionend",
|
|
187
|
+
]);
|
|
188
|
+
/** First dotted segment of a name (`System.assertEquals(3)` -> `System`). */
|
|
189
|
+
const headOf = (name) => name.split(/[.(]/, 1)[0] ?? name;
|
|
190
|
+
/** True when a dangling dst names something no extractor of the org's own
|
|
191
|
+
* source can ever materialize:
|
|
192
|
+
* - standard tabs (`CustomTab:standard-*`);
|
|
193
|
+
* - standard-schema objects (no custom suffix) and their unsuffixed fields;
|
|
194
|
+
* on a custom object only its real standard fields (`X__c.Name`,
|
|
195
|
+
* `X__c.OwnerId`, `Y__mdt.DeveloperName`, ...);
|
|
196
|
+
* - managed-package metadata (`<ns>__Name`, `<ns>__Obj__c.<ns>__F__c`, and
|
|
197
|
+
* `ns.Type` for a namespace in `knownNamespaces` or the
|
|
198
|
+
* `%vlocity_namespace%` placeholder);
|
|
199
|
+
* - Apex platform classes and calls into them (`System.assertEquals`,
|
|
200
|
+
* `Assert.areEqual`);
|
|
201
|
+
* - standard DOM events (`LWCEvent:click`).
|
|
202
|
+
* Custom-suffixed, unnamespaced targets are NEVER platform refs — a missing
|
|
203
|
+
* `__c` target is a real gap worth surfacing — and neither is an empty
|
|
204
|
+
* object or field name, which is a parser bug (`CustomObject:`). */
|
|
205
|
+
export function isPlatformBuiltinRef(dst, knownNamespaces = new Set(), customSettings = new Set()) {
|
|
206
|
+
const i = dst.indexOf(":");
|
|
207
|
+
if (i <= 0)
|
|
208
|
+
return false;
|
|
209
|
+
const label = dst.slice(0, i);
|
|
210
|
+
const name = dst.slice(i + 1);
|
|
211
|
+
if (name.length === 0)
|
|
212
|
+
return false;
|
|
213
|
+
const head = headOf(name);
|
|
214
|
+
// `ns.Type`: a dotted head that is a namespace.
|
|
215
|
+
const dottedNs = name.length > head.length &&
|
|
216
|
+
(head.toLowerCase() === NS_PLACEHOLDER || knownNamespaces.has(head.toLowerCase()));
|
|
217
|
+
if (label === "CustomTab" && name.startsWith("standard-"))
|
|
218
|
+
return true;
|
|
219
|
+
if (label === "LWCEvent")
|
|
220
|
+
return DOM_EVENTS.has(name.toLowerCase());
|
|
221
|
+
if (label === "CustomField") {
|
|
222
|
+
const dot = name.indexOf(".");
|
|
223
|
+
if (dot <= 0 || dot === name.length - 1)
|
|
224
|
+
return false;
|
|
225
|
+
const obj = name.slice(0, dot);
|
|
226
|
+
const field = name.slice(dot + 1);
|
|
227
|
+
if (isNamespaced(obj) || isNamespaced(field))
|
|
228
|
+
return true;
|
|
229
|
+
// A custom, relationship or derived field (`X__c`, `CaseId__r`, `City__cy`).
|
|
230
|
+
if (field.includes("__"))
|
|
231
|
+
return false;
|
|
232
|
+
const suffix = CUSTOM_SUFFIX_RE.exec(obj)?.[0].slice(2).toLowerCase();
|
|
233
|
+
if (suffix === undefined && !obj.includes("__"))
|
|
234
|
+
return true; // standard object
|
|
235
|
+
if (field.toLowerCase() === "setupownerid")
|
|
236
|
+
return customSettings.has(obj.toLowerCase());
|
|
237
|
+
return ((STANDARD_FIELDS_BY_SUFFIX[suffix ?? "c"] ?? STANDARD_FIELDS_BY_SUFFIX.c)?.has(field.toLowerCase()) === true);
|
|
238
|
+
}
|
|
239
|
+
if (label === "CustomObject") {
|
|
240
|
+
// Standard objects never contain `__` (`Foo__History` is derived from a custom one).
|
|
241
|
+
return isNamespaced(name) || !name.includes("__");
|
|
242
|
+
}
|
|
243
|
+
if (label === "ApexClass" || label === "ApexInterface" || label === "ApexMethod") {
|
|
244
|
+
// The narrow core set, not the parser superset (see AUDIT_PLATFORM_CORE).
|
|
245
|
+
return AUDIT_PLATFORM_CORE.has(head.toLowerCase()) || isNamespaced(head) || dottedNs;
|
|
246
|
+
}
|
|
247
|
+
// Any other metadata named in a managed namespace (ApexPage, CustomTab,
|
|
248
|
+
// CustomMetadataType, StaticResource, Remote, ...).
|
|
249
|
+
return isNamespaced(head) || dottedNs;
|
|
250
|
+
}
|
|
251
|
+
/** Edge-level classification: `isPlatformBuiltinRef` on the target, plus
|
|
252
|
+
* what only the edge knows. A `lightning-*` tag is a base component
|
|
253
|
+
* (`LWC:button` from `<lightning-button>`); an `IS_TEST_FOR` target is
|
|
254
|
+
* always an org class, so a dangling one is a parser gap even when its name
|
|
255
|
+
* is a platform class (`ApexClass:Test` from `Test.startTest()`). */
|
|
256
|
+
export function isExpectedDanglingEdge(e, knownNamespaces = new Set(), customSettings = new Set()) {
|
|
257
|
+
return (edgeVerdict(String(e.relType), () => e.attributes) ??
|
|
258
|
+
isPlatformBuiltinRef(String(e.dstQualifiedName), knownNamespaces, customSettings));
|
|
259
|
+
}
|
|
260
|
+
/** The part of `isExpectedDanglingEdge` only the edge decides: false for
|
|
261
|
+
* IS_TEST_FOR, true for a `lightning-*` tag, undefined when the target
|
|
262
|
+
* decides. `attrs` is called only when the tag matters. */
|
|
263
|
+
function edgeVerdict(relType, attrs) {
|
|
264
|
+
if (relType === REL_TYPES.IS_TEST_FOR)
|
|
265
|
+
return false;
|
|
266
|
+
const tag = attrs()?.tag;
|
|
267
|
+
if (typeof tag === "string" && tag.toLowerCase().startsWith("lightning-"))
|
|
268
|
+
return true;
|
|
269
|
+
return undefined;
|
|
270
|
+
}
|
|
271
|
+
/** Parsed attributes of a stored edge row, skipping the parse when the JSON
|
|
272
|
+
* cannot hold a top-level `tag` key (the only key the classifier reads). */
|
|
273
|
+
function rowAttrs(json) {
|
|
274
|
+
return json.includes('"tag"') ? JSON.parse(json) : undefined;
|
|
275
|
+
}
|
|
276
|
+
/** Classification key of a dangling edge: its edge verdict plus its target.
|
|
277
|
+
* Edges with the same key are classified alike, so the audit classifies
|
|
278
|
+
* each distinct key once. */
|
|
279
|
+
function verdictKey(e) {
|
|
280
|
+
const v = edgeVerdict(e.relType, () => rowAttrs(e.attributes));
|
|
281
|
+
return `${v === undefined ? "P" : v ? "E" : "U"}${e.dst}`;
|
|
282
|
+
}
|
|
283
|
+
function keyIsExpected(key, knownNamespaces, customSettings) {
|
|
284
|
+
const v = key[0];
|
|
285
|
+
if (v === "E")
|
|
286
|
+
return true;
|
|
287
|
+
if (v === "U")
|
|
288
|
+
return false;
|
|
289
|
+
return isPlatformBuiltinRef(key.slice(1), knownNamespaces, customSettings);
|
|
290
|
+
}
|
|
291
|
+
/** Lower-cased objects, among those with a dangling `SetupOwnerId` ref, that
|
|
292
|
+
* the graph knows to be custom settings: the object node carries
|
|
293
|
+
* `customSettingsType`, or a `CustomSetting:<obj>` node exists. */
|
|
294
|
+
function customSettingsIn(store, orgId, dsts) {
|
|
295
|
+
const out = new Set();
|
|
296
|
+
const seen = new Set();
|
|
297
|
+
for (const dst of dsts) {
|
|
298
|
+
if (!dst.startsWith("CustomField:") || !/\.setupownerid$/i.test(dst))
|
|
299
|
+
continue;
|
|
300
|
+
const obj = dst.slice("CustomField:".length, dst.lastIndexOf("."));
|
|
301
|
+
if (seen.has(obj))
|
|
302
|
+
continue;
|
|
303
|
+
seen.add(obj);
|
|
304
|
+
const node = store.getNode(orgId, asQualifiedName(`CustomObject:${obj}`));
|
|
305
|
+
const type = node?.attributes?.customSettingsType;
|
|
306
|
+
const known = (typeof type === "string" && type.length > 0) ||
|
|
307
|
+
store.getNode(orgId, asQualifiedName(`CustomSetting:${obj}`)) !== null;
|
|
308
|
+
if (known)
|
|
309
|
+
out.add(obj.toLowerCase());
|
|
310
|
+
}
|
|
311
|
+
return out;
|
|
312
|
+
}
|
|
6
313
|
export function auditDanglingEdges(store, orgIdIn, opts = {}) {
|
|
7
314
|
const orgId = typeof orgIdIn === "string" ? asOrgId(orgIdIn) : orgIdIn;
|
|
8
315
|
// Clamp to ≥0; a negative slice index would silently return a tail of the
|
|
9
|
-
// dangling array rather than an empty sample.
|
|
10
|
-
|
|
316
|
+
// dangling array rather than an empty sample. Truncate as slice() did
|
|
317
|
+
// (2.5 -> 2; NaN stays NaN and, like slice(0, NaN), yields no sample).
|
|
318
|
+
const sampleSize = Math.trunc(Math.max(0, opts.sampleSize ?? 25));
|
|
11
319
|
const totalEdges = store.countEdges(orgId);
|
|
12
|
-
|
|
320
|
+
// Streamed: a large org has ~1M dangling edges (645k of them
|
|
321
|
+
// GRANTS_APEX_ACCESS), so they are never held at once. Pass 1 counts, and keeps each
|
|
322
|
+
// distinct classification key once plus the first `sampleSize` edges.
|
|
13
323
|
const byRel = {};
|
|
14
324
|
const byDstPrefix = {};
|
|
15
|
-
|
|
325
|
+
let danglingCount = 0;
|
|
326
|
+
const keyCounts = new Map();
|
|
327
|
+
const head = [];
|
|
328
|
+
for (const e of store.iterateDanglingEdges(orgId, opts.scanLimit)) {
|
|
329
|
+
danglingCount += 1;
|
|
16
330
|
byRel[e.relType] = (byRel[e.relType] ?? 0) + 1;
|
|
17
|
-
const p = prefix(
|
|
331
|
+
const p = prefix(e.dst);
|
|
18
332
|
byDstPrefix[p] = (byDstPrefix[p] ?? 0) + 1;
|
|
333
|
+
const k = verdictKey(e);
|
|
334
|
+
keyCounts.set(k, (keyCounts.get(k) ?? 0) + 1);
|
|
335
|
+
if (head.length < sampleSize)
|
|
336
|
+
head.push(e);
|
|
337
|
+
}
|
|
338
|
+
// Both sets depend only on the distinct targets.
|
|
339
|
+
const dsts = new Set();
|
|
340
|
+
for (const k of keyCounts.keys())
|
|
341
|
+
dsts.add(k.slice(1));
|
|
342
|
+
const namespaces = namespacesIn(dsts);
|
|
343
|
+
const customSettings = customSettingsIn(store, orgId, dsts);
|
|
344
|
+
const expectedKeys = new Set();
|
|
345
|
+
let platformRefCount = 0;
|
|
346
|
+
for (const [k, n] of keyCounts) {
|
|
347
|
+
if (!keyIsExpected(k, namespaces, customSettings))
|
|
348
|
+
continue;
|
|
349
|
+
expectedKeys.add(k);
|
|
350
|
+
platformRefCount += n;
|
|
351
|
+
}
|
|
352
|
+
const unexpectedCount = danglingCount - platformRefCount;
|
|
353
|
+
// Sample the *unexpected* dangling edges first — those are the ones a
|
|
354
|
+
// user can act on; platform refs only pad the sample once the unexpected
|
|
355
|
+
// set is smaller than sampleSize. Same result as a stable sort of every
|
|
356
|
+
// edge, unexpected first: the first unexpected edges in scan order (pass 2,
|
|
357
|
+
// stopped as soon as enough are found), then the first expected ones, which
|
|
358
|
+
// all lie within the first `sampleSize` edges (`head`).
|
|
359
|
+
const picked = [];
|
|
360
|
+
const wantUnexpected = Math.min(sampleSize, unexpectedCount);
|
|
361
|
+
if (wantUnexpected > 0) {
|
|
362
|
+
for (const e of store.iterateDanglingEdges(orgId, opts.scanLimit)) {
|
|
363
|
+
if (expectedKeys.has(verdictKey(e)))
|
|
364
|
+
continue;
|
|
365
|
+
picked.push(e);
|
|
366
|
+
if (picked.length >= wantUnexpected)
|
|
367
|
+
break;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
for (const e of head) {
|
|
371
|
+
if (picked.length >= sampleSize)
|
|
372
|
+
break;
|
|
373
|
+
if (expectedKeys.has(verdictKey(e)))
|
|
374
|
+
picked.push(e);
|
|
19
375
|
}
|
|
20
|
-
const sample =
|
|
21
|
-
src:
|
|
22
|
-
rel:
|
|
23
|
-
dst:
|
|
376
|
+
const sample = picked.map((e) => ({
|
|
377
|
+
src: e.src,
|
|
378
|
+
rel: e.relType,
|
|
379
|
+
dst: e.dst,
|
|
24
380
|
}));
|
|
25
381
|
return {
|
|
26
382
|
totalEdges,
|
|
27
|
-
danglingCount
|
|
383
|
+
danglingCount,
|
|
384
|
+
platformRefCount,
|
|
385
|
+
unexpectedCount,
|
|
28
386
|
byRel,
|
|
29
387
|
byDstPrefix,
|
|
30
388
|
sample,
|
|
31
389
|
};
|
|
32
390
|
}
|
|
33
391
|
/**
|
|
34
|
-
* Destructive companion to `auditDanglingEdges`: deletes
|
|
392
|
+
* Destructive companion to `auditDanglingEdges`: deletes dangling edges.
|
|
35
393
|
* Reserved for the CLI `--delete-dangling --yes` flag; callers must own the
|
|
36
394
|
* authorization decision (we just do the work).
|
|
395
|
+
*
|
|
396
|
+
* Platform-builtin references (standard-tab grants, standard-schema field
|
|
397
|
+
* grants) are KEPT by default — they're real, queryable security data whose
|
|
398
|
+
* target simply has no metadata source. Pass `includePlatformRefs: true` to
|
|
399
|
+
* delete those too.
|
|
37
400
|
*/
|
|
38
|
-
export function deleteDanglingEdges(store, orgIdIn) {
|
|
401
|
+
export function deleteDanglingEdges(store, orgIdIn, opts = {}) {
|
|
39
402
|
const orgId = typeof orgIdIn === "string" ? asOrgId(orgIdIn) : orgIdIn;
|
|
40
403
|
const dangling = store.listDanglingEdges(orgId);
|
|
41
404
|
let deleted = 0;
|
|
405
|
+
let keptPlatformRefs = 0;
|
|
42
406
|
store.transaction(() => {
|
|
43
407
|
for (const e of dangling) {
|
|
408
|
+
if (!opts.includePlatformRefs && isPlatformBuiltinRef(String(e.dstQualifiedName))) {
|
|
409
|
+
keptPlatformRefs += 1;
|
|
410
|
+
continue;
|
|
411
|
+
}
|
|
44
412
|
store.deleteEdge(orgId, e.srcQualifiedName, e.dstQualifiedName, e.relType);
|
|
45
413
|
deleted += 1;
|
|
46
414
|
}
|
|
47
415
|
});
|
|
48
|
-
return { deleted };
|
|
416
|
+
return { deleted, keptPlatformRefs };
|
|
49
417
|
}
|
|
50
418
|
//# sourceMappingURL=audit-graph.js.map
|