@suss/adapter-typescript 0.5.9 → 0.5.11

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
@@ -394,7 +394,8 @@ interface DiscoveredUnit {
394
394
  */
395
395
  channelInfo?: {
396
396
  messageBus: MessageBusSemantics["messageBus"];
397
- channel: string;
397
+ /** Null when the pack knows the wire but not the channel on it. */
398
+ channel: string | null;
398
399
  };
399
400
  /** The thing that gets deployed and runs this unit, when known. */
400
401
  deployableUnit?: DeployableUnit;
@@ -536,7 +537,7 @@ interface FoundTerminal {
536
537
  * discovered. Inside a nested function only escaping terminals are
537
538
  * matched: see `NESTED_ESCAPING_MATCH_TYPES`.
538
539
  */
539
- declare function findTerminals(func: FunctionRoot, patterns: TerminalPattern[], barriers?: DescentBarriers): FoundTerminal[];
540
+ declare function findTerminals(func: FunctionRoot, patterns: TerminalPattern[], barriers?: DescentBarriers, resolveWrittenValue?: (value: Node) => Node | null): FoundTerminal[];
540
541
 
541
542
  /**
542
543
  * Turns one function into the list of branches a summary is built from.
@@ -639,6 +640,12 @@ interface ConfiguredCallContext {
639
640
  * with the wrong consumer, which is worse than missing the producer.
640
641
  */
641
642
  declare function readConfiguredCall(call: CallExpression, ctx: ConfiguredCallContext, spec: ConfiguredCallSpec): ConfiguredCallRead | null;
643
+ /**
644
+ * The identifier a property-access chain starts from, so `client.send`
645
+ * and `sqs.client.send` both come back as the name a pack can look up.
646
+ * Null when the chain starts from something else, a call or a literal.
647
+ */
648
+ declare function rootIdentifier(node: Node): Node | null;
642
649
 
643
650
  interface ContractReadResult {
644
651
  declaredContract: RawDeclaredContract;
@@ -945,4 +952,4 @@ declare function computeAdapterPacksDigest(packVersions: ReadonlyArray<{
945
952
  version?: string;
946
953
  }>): string;
947
954
 
948
- export { ADAPTER_VERSION, type CacheDiagnostic, type CacheLookup, type ClientCallSite, type ConfiguredCallContext, type ConfiguredCallRead, type ConfiguredCallSpec, type ContractReadResult, type DiscoveredUnit, type EmptyStage, type ExtractionReport, type FoundTerminal, type FunctionRoot, type HealthCheck, type HealthViolation, type PackFunnel, ResolutionStore, type Timer, type TimingReport, type TsDiscoveryContext, type TsJsxAttributeLocation, type TsSubUnitContext, type TypeScriptAdapter, type TypeScriptAdapterConfig, collectAncestorBranches, collectClientFieldAccesses, computeAdapterPacksDigest, computeContentHash, createProjectWithoutTsconfig, createTsDiscoveryContext, createTsSubUnitContext, createTypeScriptAdapter, discoverUnits, evaluatePackHealth, exportedDeclarationsOf, extractCodeStructure, extractRawBranches, findNearestTsconfig, findTerminals, formatPackHealth, isImportedFrom, parseConditionExpression, readConfiguredCall, readContract, readContractForClientCall, resolveAliasedSymbol, resolveSubject };
955
+ export { ADAPTER_VERSION, type CacheDiagnostic, type CacheLookup, type ClientCallSite, type ConfiguredCallContext, type ConfiguredCallRead, type ConfiguredCallSpec, type ContractReadResult, type DiscoveredUnit, type EmptyStage, type ExtractionReport, type FoundTerminal, type FunctionRoot, type HealthCheck, type HealthViolation, type PackFunnel, ResolutionStore, type Timer, type TimingReport, type TsDiscoveryContext, type TsJsxAttributeLocation, type TsSubUnitContext, type TypeScriptAdapter, type TypeScriptAdapterConfig, collectAncestorBranches, collectClientFieldAccesses, computeAdapterPacksDigest, computeContentHash, createProjectWithoutTsconfig, createTsDiscoveryContext, createTsSubUnitContext, createTypeScriptAdapter, discoverUnits, evaluatePackHealth, exportedDeclarationsOf, extractCodeStructure, extractRawBranches, findNearestTsconfig, findTerminals, formatPackHealth, isImportedFrom, parseConditionExpression, readConfiguredCall, readContract, readContractForClientCall, resolveAliasedSymbol, resolveSubject, rootIdentifier };
package/dist/index.d.ts CHANGED
@@ -394,7 +394,8 @@ interface DiscoveredUnit {
394
394
  */
395
395
  channelInfo?: {
396
396
  messageBus: MessageBusSemantics["messageBus"];
397
- channel: string;
397
+ /** Null when the pack knows the wire but not the channel on it. */
398
+ channel: string | null;
398
399
  };
399
400
  /** The thing that gets deployed and runs this unit, when known. */
400
401
  deployableUnit?: DeployableUnit;
@@ -536,7 +537,7 @@ interface FoundTerminal {
536
537
  * discovered. Inside a nested function only escaping terminals are
537
538
  * matched: see `NESTED_ESCAPING_MATCH_TYPES`.
538
539
  */
539
- declare function findTerminals(func: FunctionRoot, patterns: TerminalPattern[], barriers?: DescentBarriers): FoundTerminal[];
540
+ declare function findTerminals(func: FunctionRoot, patterns: TerminalPattern[], barriers?: DescentBarriers, resolveWrittenValue?: (value: Node) => Node | null): FoundTerminal[];
540
541
 
541
542
  /**
542
543
  * Turns one function into the list of branches a summary is built from.
@@ -639,6 +640,12 @@ interface ConfiguredCallContext {
639
640
  * with the wrong consumer, which is worse than missing the producer.
640
641
  */
641
642
  declare function readConfiguredCall(call: CallExpression, ctx: ConfiguredCallContext, spec: ConfiguredCallSpec): ConfiguredCallRead | null;
643
+ /**
644
+ * The identifier a property-access chain starts from, so `client.send`
645
+ * and `sqs.client.send` both come back as the name a pack can look up.
646
+ * Null when the chain starts from something else, a call or a literal.
647
+ */
648
+ declare function rootIdentifier(node: Node): Node | null;
642
649
 
643
650
  interface ContractReadResult {
644
651
  declaredContract: RawDeclaredContract;
@@ -945,4 +952,4 @@ declare function computeAdapterPacksDigest(packVersions: ReadonlyArray<{
945
952
  version?: string;
946
953
  }>): string;
947
954
 
948
- export { ADAPTER_VERSION, type CacheDiagnostic, type CacheLookup, type ClientCallSite, type ConfiguredCallContext, type ConfiguredCallRead, type ConfiguredCallSpec, type ContractReadResult, type DiscoveredUnit, type EmptyStage, type ExtractionReport, type FoundTerminal, type FunctionRoot, type HealthCheck, type HealthViolation, type PackFunnel, ResolutionStore, type Timer, type TimingReport, type TsDiscoveryContext, type TsJsxAttributeLocation, type TsSubUnitContext, type TypeScriptAdapter, type TypeScriptAdapterConfig, collectAncestorBranches, collectClientFieldAccesses, computeAdapterPacksDigest, computeContentHash, createProjectWithoutTsconfig, createTsDiscoveryContext, createTsSubUnitContext, createTypeScriptAdapter, discoverUnits, evaluatePackHealth, exportedDeclarationsOf, extractCodeStructure, extractRawBranches, findNearestTsconfig, findTerminals, formatPackHealth, isImportedFrom, parseConditionExpression, readConfiguredCall, readContract, readContractForClientCall, resolveAliasedSymbol, resolveSubject };
955
+ export { ADAPTER_VERSION, type CacheDiagnostic, type CacheLookup, type ClientCallSite, type ConfiguredCallContext, type ConfiguredCallRead, type ConfiguredCallSpec, type ContractReadResult, type DiscoveredUnit, type EmptyStage, type ExtractionReport, type FoundTerminal, type FunctionRoot, type HealthCheck, type HealthViolation, type PackFunnel, ResolutionStore, type Timer, type TimingReport, type TsDiscoveryContext, type TsJsxAttributeLocation, type TsSubUnitContext, type TypeScriptAdapter, type TypeScriptAdapterConfig, collectAncestorBranches, collectClientFieldAccesses, computeAdapterPacksDigest, computeContentHash, createProjectWithoutTsconfig, createTsDiscoveryContext, createTsSubUnitContext, createTypeScriptAdapter, discoverUnits, evaluatePackHealth, exportedDeclarationsOf, extractCodeStructure, extractRawBranches, findNearestTsconfig, findTerminals, formatPackHealth, isImportedFrom, parseConditionExpression, readConfiguredCall, readContract, readContractForClientCall, resolveAliasedSymbol, resolveSubject, rootIdentifier };