@suss/adapter-typescript 0.22.0 → 0.22.2
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/index.cjs +874 -478
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +872 -461
- package/package.json +6 -5
package/dist/index.d.cts
CHANGED
|
@@ -2,10 +2,10 @@ import { SourceFile, Node, FunctionDeclaration, FunctionExpression, ArrowFunctio
|
|
|
2
2
|
import { TransparentWrapper, RawCondition, DiscoveryPattern, TerminalPattern, InputMappingPattern, EffectArg, CallOps, LanguageAdapter, PatternPack, ExtractorOptions, TimingReport, CacheDiagnostic, ExtractionReport, InvocationRecognizer, AccessRecognizer, RawCodeStructure, RawTerminal, RawBranch, configuredCallOption, RawDeclaredContract, ContractPattern, AstCapableOps, ResponsePropertyMapping } from '@suss/extractor';
|
|
3
3
|
export { EmptyStage, ExtractionReport, PackFunnel, Timer, TimingReport, computeContentHash } from '@suss/extractor';
|
|
4
4
|
import { MessageBusSemantics, DeployableUnit, UnfollowedCall, BehavioralSummary, BoundaryBinding, Predicate, TypeShape, ValueRef } from '@suss/behavioral-ir';
|
|
5
|
-
import { z } from 'zod';
|
|
6
5
|
import { ExplainStats, WhyExplained, ValueLocation } from '@suss/resolution';
|
|
7
6
|
export { ExplainStats, ValueLocation, WhyExplained } from '@suss/resolution';
|
|
8
7
|
import { Proof, Atom } from '@suss/datalog';
|
|
8
|
+
import { z } from 'zod';
|
|
9
9
|
|
|
10
10
|
/** One question: do these files reach any of these packages. */
|
|
11
11
|
interface FileSetQuery {
|
|
@@ -639,7 +639,7 @@ type ResolveCallee = (callee: Node) => Node | null;
|
|
|
639
639
|
* framework or a runtime belongs to a pack.
|
|
640
640
|
*/
|
|
641
641
|
|
|
642
|
-
declare function extractCodeStructure(unit: DiscoveredUnit, pack: PatternPack, invocationRecognizers?: InvocationRecognizer[], accessRecognizers?: AccessRecognizer[], barriers?: DescentBarriers,
|
|
642
|
+
declare function extractCodeStructure(unit: DiscoveredUnit, pack: PatternPack, invocationRecognizers?: InvocationRecognizer[], accessRecognizers?: AccessRecognizer[], barriers?: DescentBarriers, resolution?: ResolutionStore, originatesFrom?: OriginatesFrom, anchorCallsOf?: AnchorCallsOf, resolveCallee?: ResolveCallee): RawCodeStructure;
|
|
643
643
|
interface TypeScriptAdapterConfig {
|
|
644
644
|
tsConfigFilePath?: string;
|
|
645
645
|
/**
|
|
@@ -703,7 +703,7 @@ interface FoundTerminal {
|
|
|
703
703
|
* discovered. Inside a nested function only escaping terminals are
|
|
704
704
|
* matched: see `NESTED_ESCAPING_MATCH_TYPES`.
|
|
705
705
|
*/
|
|
706
|
-
declare function findTerminals(func: FunctionRoot, patterns: TerminalPattern[], barriers?: DescentBarriers,
|
|
706
|
+
declare function findTerminals(func: FunctionRoot, patterns: TerminalPattern[], barriers?: DescentBarriers, resolution?: ResolutionStore, originatesFrom?: OriginatesFrom, resolveCallee?: ResolveCallee): FoundTerminal[];
|
|
707
707
|
|
|
708
708
|
/**
|
|
709
709
|
* Turns one function into the list of branches a summary is built from.
|
|
@@ -732,7 +732,7 @@ interface RawBranchResult {
|
|
|
732
732
|
* or when every condition on it came from an early return or throw,
|
|
733
733
|
* since those are the paths that run when no guard fired.
|
|
734
734
|
*/
|
|
735
|
-
declare function extractRawBranches(func: FunctionRoot, terminalPatterns: TerminalPattern[], invocationRecognizers?: InvocationRecognizer[], accessRecognizers?: AccessRecognizer[], barriers?: DescentBarriers,
|
|
735
|
+
declare function extractRawBranches(func: FunctionRoot, terminalPatterns: TerminalPattern[], invocationRecognizers?: InvocationRecognizer[], accessRecognizers?: AccessRecognizer[], barriers?: DescentBarriers, resolution?: ResolutionStore, originatesFrom?: OriginatesFrom, anchorCallsOf?: AnchorCallsOf, resolveCallee?: ResolveCallee): RawBranchResult;
|
|
736
736
|
|
|
737
737
|
/**
|
|
738
738
|
* A Project covering `rootDir`, for a codebase with no tsconfig to read.
|
package/dist/index.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ import { SourceFile, Node, FunctionDeclaration, FunctionExpression, ArrowFunctio
|
|
|
2
2
|
import { TransparentWrapper, RawCondition, DiscoveryPattern, TerminalPattern, InputMappingPattern, EffectArg, CallOps, LanguageAdapter, PatternPack, ExtractorOptions, TimingReport, CacheDiagnostic, ExtractionReport, InvocationRecognizer, AccessRecognizer, RawCodeStructure, RawTerminal, RawBranch, configuredCallOption, RawDeclaredContract, ContractPattern, AstCapableOps, ResponsePropertyMapping } from '@suss/extractor';
|
|
3
3
|
export { EmptyStage, ExtractionReport, PackFunnel, Timer, TimingReport, computeContentHash } from '@suss/extractor';
|
|
4
4
|
import { MessageBusSemantics, DeployableUnit, UnfollowedCall, BehavioralSummary, BoundaryBinding, Predicate, TypeShape, ValueRef } from '@suss/behavioral-ir';
|
|
5
|
-
import { z } from 'zod';
|
|
6
5
|
import { ExplainStats, WhyExplained, ValueLocation } from '@suss/resolution';
|
|
7
6
|
export { ExplainStats, ValueLocation, WhyExplained } from '@suss/resolution';
|
|
8
7
|
import { Proof, Atom } from '@suss/datalog';
|
|
8
|
+
import { z } from 'zod';
|
|
9
9
|
|
|
10
10
|
/** One question: do these files reach any of these packages. */
|
|
11
11
|
interface FileSetQuery {
|
|
@@ -639,7 +639,7 @@ type ResolveCallee = (callee: Node) => Node | null;
|
|
|
639
639
|
* framework or a runtime belongs to a pack.
|
|
640
640
|
*/
|
|
641
641
|
|
|
642
|
-
declare function extractCodeStructure(unit: DiscoveredUnit, pack: PatternPack, invocationRecognizers?: InvocationRecognizer[], accessRecognizers?: AccessRecognizer[], barriers?: DescentBarriers,
|
|
642
|
+
declare function extractCodeStructure(unit: DiscoveredUnit, pack: PatternPack, invocationRecognizers?: InvocationRecognizer[], accessRecognizers?: AccessRecognizer[], barriers?: DescentBarriers, resolution?: ResolutionStore, originatesFrom?: OriginatesFrom, anchorCallsOf?: AnchorCallsOf, resolveCallee?: ResolveCallee): RawCodeStructure;
|
|
643
643
|
interface TypeScriptAdapterConfig {
|
|
644
644
|
tsConfigFilePath?: string;
|
|
645
645
|
/**
|
|
@@ -703,7 +703,7 @@ interface FoundTerminal {
|
|
|
703
703
|
* discovered. Inside a nested function only escaping terminals are
|
|
704
704
|
* matched: see `NESTED_ESCAPING_MATCH_TYPES`.
|
|
705
705
|
*/
|
|
706
|
-
declare function findTerminals(func: FunctionRoot, patterns: TerminalPattern[], barriers?: DescentBarriers,
|
|
706
|
+
declare function findTerminals(func: FunctionRoot, patterns: TerminalPattern[], barriers?: DescentBarriers, resolution?: ResolutionStore, originatesFrom?: OriginatesFrom, resolveCallee?: ResolveCallee): FoundTerminal[];
|
|
707
707
|
|
|
708
708
|
/**
|
|
709
709
|
* Turns one function into the list of branches a summary is built from.
|
|
@@ -732,7 +732,7 @@ interface RawBranchResult {
|
|
|
732
732
|
* or when every condition on it came from an early return or throw,
|
|
733
733
|
* since those are the paths that run when no guard fired.
|
|
734
734
|
*/
|
|
735
|
-
declare function extractRawBranches(func: FunctionRoot, terminalPatterns: TerminalPattern[], invocationRecognizers?: InvocationRecognizer[], accessRecognizers?: AccessRecognizer[], barriers?: DescentBarriers,
|
|
735
|
+
declare function extractRawBranches(func: FunctionRoot, terminalPatterns: TerminalPattern[], invocationRecognizers?: InvocationRecognizer[], accessRecognizers?: AccessRecognizer[], barriers?: DescentBarriers, resolution?: ResolutionStore, originatesFrom?: OriginatesFrom, anchorCallsOf?: AnchorCallsOf, resolveCallee?: ResolveCallee): RawBranchResult;
|
|
736
736
|
|
|
737
737
|
/**
|
|
738
738
|
* A Project covering `rootDir`, for a codebase with no tsconfig to read.
|