@suss/adapter-typescript 0.26.0 → 0.28.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/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { SourceFile, Node, FunctionDeclaration, FunctionExpression, ArrowFunction, MethodDeclaration, CallExpression, PropertyAccessExpression, TaggedTemplateExpression, Project, ImportDeclaration, Symbol, Expression, NewExpression, Identifier } from 'ts-morph';
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
- import { MessageBusSemantics, DeployableUnit, UnfollowedCall, BehavioralSummary, BoundaryBinding, Predicate, TypeShape, ValueRef } from '@suss/behavioral-ir';
4
+ import { MessageBusSemantics, DeployableUnit, UnfollowedCall, WrapperReference, BehavioralSummary, BoundaryBinding, Predicate, TypeShape, ValueRef } from '@suss/behavioral-ir';
5
5
  import { ExplainStats, WhyExplained, ValueLocation } from '@suss/resolution';
6
6
  export { ExplainStats, ValueLocation, WhyExplained } from '@suss/resolution';
7
7
  import { Proof, Atom } from '@suss/datalog';
@@ -468,6 +468,19 @@ interface DiscoveredUnit {
468
468
  * walk records.
469
469
  */
470
470
  unfollowed?: UnfollowedCall;
471
+ /**
472
+ * The functions the registration call lists before this handler,
473
+ * `router.post("/", validate, handler)`, in the order they run. Each
474
+ * is a unit of its own in the same file, and these references point
475
+ * the handler at them. They run inside whatever the app registers
476
+ * for every route, so they are applied after those.
477
+ */
478
+ routeWrappers?: WrapperReference[];
479
+ /**
480
+ * The functions listed before this handler that a project factory
481
+ * returned and the store could not follow, one stop per call.
482
+ */
483
+ routeUnfollowed?: UnfollowedCall[];
471
484
  }
472
485
 
473
486
  /**
@@ -796,6 +809,14 @@ declare function createProjectWithoutTsconfig(rootDir: string): {
796
809
  project: Project;
797
810
  files: string[];
798
811
  };
812
+ /**
813
+ * `tsconfig.base.json` is the file an Nx or similar monorepo root keeps
814
+ * its path aliases in, with no `tsconfig.json` beside it. It is only
815
+ * read in the directory the command points at: a base file has no
816
+ * `include` of its own, so found while walking up it would claim every
817
+ * file below it, well past the directory that was asked for.
818
+ */
819
+ declare const TSCONFIG_NAMES: readonly ["tsconfig.json", "jsconfig.json", "tsconfig.base.json"];
799
820
  /** The nearest tsconfig or jsconfig at or above `startDir`, or null. */
800
821
  declare function findNearestTsconfig(startDir: string): string | null;
801
822
 
@@ -1333,4 +1354,4 @@ declare function computeAdapterPacksDigest(packVersions: ReadonlyArray<{
1333
1354
  version?: string;
1334
1355
  }>): string;
1335
1356
 
1336
- export { ADAPTER_VERSION, type Accessed, type CallAccountingEntry, type CallAccountingOutcome, type ClientCallSite, type ConfiguredCallContext, type ConfiguredCallRead, type ConfiguredCallSpec, type ContractReadResult, type DescentBarriers, type DiscoveredUnit, type ExplainCallableOptions, type ExplainedResolution, type FoundTerminal, type FunctionRoot, GENERIC_TERMINALS, type ImportScanOptions, NO_BARRIERS, type ObservedStubCall, type RawBranchResult, type ReadNameOptions, ResolutionStore, type StubCallEvidence, type StubEvidenceOptions, type TsDiscoveryContext, type TsInvocationRecognizerContext, type TsJsxAttributeLocation, type TsSubUnitContext, type TypeScriptAdapter, type TypeScriptAdapterConfig, TypeScriptWhySession, type WhySessionOptions, accessContextFor, buildProjectHelperIndex, callOpsFor, collectAncestorBranches, collectClientFieldAccesses, computeAdapterPacksDigest, createProjectWithoutTsconfig, createTsDiscoveryContext, createTsSubUnitContext, createTypeScriptAdapter, discoverUnits, exportedDeclarationsOf, extractCodeStructure, extractRawBranches, findNearestTsconfig, findTerminals, functionTargetOf, hasBody, importDeclarationsOf, importedNamesOf, importedRootsOf, invocationContextFor, isImportedFrom, methodDeclaredIn, namedImportsOf, parseConditionExpression, readConfiguredCall, readContract, readContractForClientCall, readName, resolveAliasedSymbol, resolveSubject, rootIdentifier, startsItsOwnScope, stubEvidence, stubEvidenceIn, workspaceRootFor };
1357
+ export { ADAPTER_VERSION, type Accessed, type CallAccountingEntry, type CallAccountingOutcome, type ClientCallSite, type ConfiguredCallContext, type ConfiguredCallRead, type ConfiguredCallSpec, type ContractReadResult, type DescentBarriers, type DiscoveredUnit, type ExplainCallableOptions, type ExplainedResolution, type FoundTerminal, type FunctionRoot, GENERIC_TERMINALS, type ImportScanOptions, NO_BARRIERS, type ObservedStubCall, type RawBranchResult, type ReadNameOptions, ResolutionStore, type StubCallEvidence, type StubEvidenceOptions, TSCONFIG_NAMES, type TsDiscoveryContext, type TsInvocationRecognizerContext, type TsJsxAttributeLocation, type TsSubUnitContext, type TypeScriptAdapter, type TypeScriptAdapterConfig, TypeScriptWhySession, type WhySessionOptions, accessContextFor, buildProjectHelperIndex, callOpsFor, collectAncestorBranches, collectClientFieldAccesses, computeAdapterPacksDigest, createProjectWithoutTsconfig, createTsDiscoveryContext, createTsSubUnitContext, createTypeScriptAdapter, discoverUnits, exportedDeclarationsOf, extractCodeStructure, extractRawBranches, findNearestTsconfig, findTerminals, functionTargetOf, hasBody, importDeclarationsOf, importedNamesOf, importedRootsOf, invocationContextFor, isImportedFrom, methodDeclaredIn, namedImportsOf, parseConditionExpression, readConfiguredCall, readContract, readContractForClientCall, readName, resolveAliasedSymbol, resolveSubject, rootIdentifier, startsItsOwnScope, stubEvidence, stubEvidenceIn, workspaceRootFor };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { SourceFile, Node, FunctionDeclaration, FunctionExpression, ArrowFunction, MethodDeclaration, CallExpression, PropertyAccessExpression, TaggedTemplateExpression, Project, ImportDeclaration, Symbol, Expression, NewExpression, Identifier } from 'ts-morph';
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
- import { MessageBusSemantics, DeployableUnit, UnfollowedCall, BehavioralSummary, BoundaryBinding, Predicate, TypeShape, ValueRef } from '@suss/behavioral-ir';
4
+ import { MessageBusSemantics, DeployableUnit, UnfollowedCall, WrapperReference, BehavioralSummary, BoundaryBinding, Predicate, TypeShape, ValueRef } from '@suss/behavioral-ir';
5
5
  import { ExplainStats, WhyExplained, ValueLocation } from '@suss/resolution';
6
6
  export { ExplainStats, ValueLocation, WhyExplained } from '@suss/resolution';
7
7
  import { Proof, Atom } from '@suss/datalog';
@@ -468,6 +468,19 @@ interface DiscoveredUnit {
468
468
  * walk records.
469
469
  */
470
470
  unfollowed?: UnfollowedCall;
471
+ /**
472
+ * The functions the registration call lists before this handler,
473
+ * `router.post("/", validate, handler)`, in the order they run. Each
474
+ * is a unit of its own in the same file, and these references point
475
+ * the handler at them. They run inside whatever the app registers
476
+ * for every route, so they are applied after those.
477
+ */
478
+ routeWrappers?: WrapperReference[];
479
+ /**
480
+ * The functions listed before this handler that a project factory
481
+ * returned and the store could not follow, one stop per call.
482
+ */
483
+ routeUnfollowed?: UnfollowedCall[];
471
484
  }
472
485
 
473
486
  /**
@@ -796,6 +809,14 @@ declare function createProjectWithoutTsconfig(rootDir: string): {
796
809
  project: Project;
797
810
  files: string[];
798
811
  };
812
+ /**
813
+ * `tsconfig.base.json` is the file an Nx or similar monorepo root keeps
814
+ * its path aliases in, with no `tsconfig.json` beside it. It is only
815
+ * read in the directory the command points at: a base file has no
816
+ * `include` of its own, so found while walking up it would claim every
817
+ * file below it, well past the directory that was asked for.
818
+ */
819
+ declare const TSCONFIG_NAMES: readonly ["tsconfig.json", "jsconfig.json", "tsconfig.base.json"];
799
820
  /** The nearest tsconfig or jsconfig at or above `startDir`, or null. */
800
821
  declare function findNearestTsconfig(startDir: string): string | null;
801
822
 
@@ -1333,4 +1354,4 @@ declare function computeAdapterPacksDigest(packVersions: ReadonlyArray<{
1333
1354
  version?: string;
1334
1355
  }>): string;
1335
1356
 
1336
- export { ADAPTER_VERSION, type Accessed, type CallAccountingEntry, type CallAccountingOutcome, type ClientCallSite, type ConfiguredCallContext, type ConfiguredCallRead, type ConfiguredCallSpec, type ContractReadResult, type DescentBarriers, type DiscoveredUnit, type ExplainCallableOptions, type ExplainedResolution, type FoundTerminal, type FunctionRoot, GENERIC_TERMINALS, type ImportScanOptions, NO_BARRIERS, type ObservedStubCall, type RawBranchResult, type ReadNameOptions, ResolutionStore, type StubCallEvidence, type StubEvidenceOptions, type TsDiscoveryContext, type TsInvocationRecognizerContext, type TsJsxAttributeLocation, type TsSubUnitContext, type TypeScriptAdapter, type TypeScriptAdapterConfig, TypeScriptWhySession, type WhySessionOptions, accessContextFor, buildProjectHelperIndex, callOpsFor, collectAncestorBranches, collectClientFieldAccesses, computeAdapterPacksDigest, createProjectWithoutTsconfig, createTsDiscoveryContext, createTsSubUnitContext, createTypeScriptAdapter, discoverUnits, exportedDeclarationsOf, extractCodeStructure, extractRawBranches, findNearestTsconfig, findTerminals, functionTargetOf, hasBody, importDeclarationsOf, importedNamesOf, importedRootsOf, invocationContextFor, isImportedFrom, methodDeclaredIn, namedImportsOf, parseConditionExpression, readConfiguredCall, readContract, readContractForClientCall, readName, resolveAliasedSymbol, resolveSubject, rootIdentifier, startsItsOwnScope, stubEvidence, stubEvidenceIn, workspaceRootFor };
1357
+ export { ADAPTER_VERSION, type Accessed, type CallAccountingEntry, type CallAccountingOutcome, type ClientCallSite, type ConfiguredCallContext, type ConfiguredCallRead, type ConfiguredCallSpec, type ContractReadResult, type DescentBarriers, type DiscoveredUnit, type ExplainCallableOptions, type ExplainedResolution, type FoundTerminal, type FunctionRoot, GENERIC_TERMINALS, type ImportScanOptions, NO_BARRIERS, type ObservedStubCall, type RawBranchResult, type ReadNameOptions, ResolutionStore, type StubCallEvidence, type StubEvidenceOptions, TSCONFIG_NAMES, type TsDiscoveryContext, type TsInvocationRecognizerContext, type TsJsxAttributeLocation, type TsSubUnitContext, type TypeScriptAdapter, type TypeScriptAdapterConfig, TypeScriptWhySession, type WhySessionOptions, accessContextFor, buildProjectHelperIndex, callOpsFor, collectAncestorBranches, collectClientFieldAccesses, computeAdapterPacksDigest, createProjectWithoutTsconfig, createTsDiscoveryContext, createTsSubUnitContext, createTypeScriptAdapter, discoverUnits, exportedDeclarationsOf, extractCodeStructure, extractRawBranches, findNearestTsconfig, findTerminals, functionTargetOf, hasBody, importDeclarationsOf, importedNamesOf, importedRootsOf, invocationContextFor, isImportedFrom, methodDeclaredIn, namedImportsOf, parseConditionExpression, readConfiguredCall, readContract, readContractForClientCall, readName, resolveAliasedSymbol, resolveSubject, rootIdentifier, startsItsOwnScope, stubEvidence, stubEvidenceIn, workspaceRootFor };