@suss/adapter-python 0.20.0 → 0.21.1

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
@@ -158,6 +158,15 @@ interface DecoratorClassification {
158
158
  * resolved there, since that is where the namespace is constructed.
159
159
  */
160
160
  objectModule?: ModuleBinding;
161
+ /**
162
+ * The call the rules say built the object this decorator hangs on, when
163
+ * the lexical scope could not say. A router prefix is looked up by this
164
+ * call rather than by a variable name, because there may not be one.
165
+ */
166
+ subjectConstruction?: {
167
+ key: string;
168
+ constructorName: string;
169
+ };
161
170
  }
162
171
  declare function classifyDecorator(decoratorNode: Node, scope: Scope): DecoratorClassification;
163
172
 
@@ -470,6 +479,12 @@ type RoutePrefixResolution = {
470
479
  };
471
480
  interface RouterIndex {
472
481
  resolve(pattern: PythonDiscoveryPattern, module: ModuleBinding, objectName: string): RoutePrefixResolution;
482
+ /**
483
+ * The same answer for a decorator whose object has no variable name to
484
+ * look up, such as one written on `self.router`. The rules give the call
485
+ * that built it, and every construction is already keyed by its call.
486
+ */
487
+ resolveConstruction(pattern: PythonDiscoveryPattern, module: ModuleBinding, constructorName: string, constructionKey: string): RoutePrefixResolution;
473
488
  /**
474
489
  * The module-level def a name in another module refers to, with that
475
490
  * module's own bindings, so a decorator written through a project wrapper
@@ -515,6 +530,8 @@ interface DiscoveryOptions {
515
530
  storage?: StorageLookup | undefined;
516
531
  /** The file's absolute path, which module resolution wants; `filePath` may be shortened for display. */
517
532
  absoluteFile?: string | undefined;
533
+ /** The project's facts, so the rules can say what an object no scope has a binding for was built by. */
534
+ facts?: Database | undefined;
518
535
  }
519
536
  declare function discoverUnits(root: Node, module: ModuleBinding, options: DiscoveryOptions): RawCodeStructure[];
520
537
 
package/dist/index.d.ts CHANGED
@@ -158,6 +158,15 @@ interface DecoratorClassification {
158
158
  * resolved there, since that is where the namespace is constructed.
159
159
  */
160
160
  objectModule?: ModuleBinding;
161
+ /**
162
+ * The call the rules say built the object this decorator hangs on, when
163
+ * the lexical scope could not say. A router prefix is looked up by this
164
+ * call rather than by a variable name, because there may not be one.
165
+ */
166
+ subjectConstruction?: {
167
+ key: string;
168
+ constructorName: string;
169
+ };
161
170
  }
162
171
  declare function classifyDecorator(decoratorNode: Node, scope: Scope): DecoratorClassification;
163
172
 
@@ -470,6 +479,12 @@ type RoutePrefixResolution = {
470
479
  };
471
480
  interface RouterIndex {
472
481
  resolve(pattern: PythonDiscoveryPattern, module: ModuleBinding, objectName: string): RoutePrefixResolution;
482
+ /**
483
+ * The same answer for a decorator whose object has no variable name to
484
+ * look up, such as one written on `self.router`. The rules give the call
485
+ * that built it, and every construction is already keyed by its call.
486
+ */
487
+ resolveConstruction(pattern: PythonDiscoveryPattern, module: ModuleBinding, constructorName: string, constructionKey: string): RoutePrefixResolution;
473
488
  /**
474
489
  * The module-level def a name in another module refers to, with that
475
490
  * module's own bindings, so a decorator written through a project wrapper
@@ -515,6 +530,8 @@ interface DiscoveryOptions {
515
530
  storage?: StorageLookup | undefined;
516
531
  /** The file's absolute path, which module resolution wants; `filePath` may be shortened for display. */
517
532
  absoluteFile?: string | undefined;
533
+ /** The project's facts, so the rules can say what an object no scope has a binding for was built by. */
534
+ facts?: Database | undefined;
518
535
  }
519
536
  declare function discoverUnits(root: Node, module: ModuleBinding, options: DiscoveryOptions): RawCodeStructure[];
520
537