@suss/adapter-python 0.19.0 → 0.21.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/README.md +32 -0
- package/dist/index.cjs +16969 -16213
- package/dist/index.d.cts +25 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.js +16971 -16213
- package/package.json +5 -5
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
|
|
|
@@ -456,12 +465,26 @@ type RoutePrefixResolution = {
|
|
|
456
465
|
} | {
|
|
457
466
|
kind: "composed";
|
|
458
467
|
value: string;
|
|
468
|
+
} | {
|
|
469
|
+
/**
|
|
470
|
+
* The router is mounted more than once, at prefixes that do not
|
|
471
|
+
* agree. Both are served at run time, so discovery emits one
|
|
472
|
+
* boundary per prefix rather than none (#689).
|
|
473
|
+
*/
|
|
474
|
+
kind: "composedMany";
|
|
475
|
+
values: string[];
|
|
459
476
|
} | {
|
|
460
477
|
kind: "abstain";
|
|
461
478
|
reason: string;
|
|
462
479
|
};
|
|
463
480
|
interface RouterIndex {
|
|
464
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;
|
|
465
488
|
/**
|
|
466
489
|
* The module-level def a name in another module refers to, with that
|
|
467
490
|
* module's own bindings, so a decorator written through a project wrapper
|
|
@@ -507,6 +530,8 @@ interface DiscoveryOptions {
|
|
|
507
530
|
storage?: StorageLookup | undefined;
|
|
508
531
|
/** The file's absolute path, which module resolution wants; `filePath` may be shortened for display. */
|
|
509
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;
|
|
510
535
|
}
|
|
511
536
|
declare function discoverUnits(root: Node, module: ModuleBinding, options: DiscoveryOptions): RawCodeStructure[];
|
|
512
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
|
|
|
@@ -456,12 +465,26 @@ type RoutePrefixResolution = {
|
|
|
456
465
|
} | {
|
|
457
466
|
kind: "composed";
|
|
458
467
|
value: string;
|
|
468
|
+
} | {
|
|
469
|
+
/**
|
|
470
|
+
* The router is mounted more than once, at prefixes that do not
|
|
471
|
+
* agree. Both are served at run time, so discovery emits one
|
|
472
|
+
* boundary per prefix rather than none (#689).
|
|
473
|
+
*/
|
|
474
|
+
kind: "composedMany";
|
|
475
|
+
values: string[];
|
|
459
476
|
} | {
|
|
460
477
|
kind: "abstain";
|
|
461
478
|
reason: string;
|
|
462
479
|
};
|
|
463
480
|
interface RouterIndex {
|
|
464
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;
|
|
465
488
|
/**
|
|
466
489
|
* The module-level def a name in another module refers to, with that
|
|
467
490
|
* module's own bindings, so a decorator written through a project wrapper
|
|
@@ -507,6 +530,8 @@ interface DiscoveryOptions {
|
|
|
507
530
|
storage?: StorageLookup | undefined;
|
|
508
531
|
/** The file's absolute path, which module resolution wants; `filePath` may be shortened for display. */
|
|
509
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;
|
|
510
535
|
}
|
|
511
536
|
declare function discoverUnits(root: Node, module: ModuleBinding, options: DiscoveryOptions): RawCodeStructure[];
|
|
512
537
|
|