tywrap 0.7.0 → 0.9.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 +36 -11
- package/SECURITY.md +39 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +8 -0
- package/dist/config/index.js.map +1 -1
- package/dist/core/annotation-parser.d.ts +2 -1
- package/dist/core/annotation-parser.d.ts.map +1 -1
- package/dist/core/annotation-parser.js +6 -3
- package/dist/core/annotation-parser.js.map +1 -1
- package/dist/core/emit-call.d.ts.map +1 -1
- package/dist/core/emit-call.js +1 -1
- package/dist/core/emit-call.js.map +1 -1
- package/dist/core/generator.d.ts +23 -4
- package/dist/core/generator.d.ts.map +1 -1
- package/dist/core/generator.js +243 -170
- package/dist/core/generator.js.map +1 -1
- package/dist/core/mapper.d.ts +3 -2
- package/dist/core/mapper.d.ts.map +1 -1
- package/dist/core/mapper.js +5 -5
- package/dist/core/mapper.js.map +1 -1
- package/dist/dev.d.ts.map +1 -1
- package/dist/dev.js +1 -3
- package/dist/dev.js.map +1 -1
- package/dist/index.d.ts +7 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/runtime/base-bridge.d.ts +3 -7
- package/dist/runtime/base-bridge.d.ts.map +1 -1
- package/dist/runtime/base-bridge.js +4 -17
- package/dist/runtime/base-bridge.js.map +1 -1
- package/dist/runtime/bounded-context.d.ts +3 -22
- package/dist/runtime/bounded-context.d.ts.map +1 -1
- package/dist/runtime/bounded-context.js +13 -53
- package/dist/runtime/bounded-context.js.map +1 -1
- package/dist/runtime/bridge-codec.d.ts +1 -1
- package/dist/runtime/bridge-codec.d.ts.map +1 -1
- package/dist/runtime/bridge-codec.js +78 -55
- package/dist/runtime/bridge-codec.js.map +1 -1
- package/dist/runtime/errors.d.ts +16 -0
- package/dist/runtime/errors.d.ts.map +1 -1
- package/dist/runtime/errors.js +17 -0
- package/dist/runtime/errors.js.map +1 -1
- package/dist/runtime/frame-codec.d.ts +111 -0
- package/dist/runtime/frame-codec.d.ts.map +1 -0
- package/dist/runtime/frame-codec.js +352 -0
- package/dist/runtime/frame-codec.js.map +1 -0
- package/dist/runtime/http-transport.d.ts +1 -1
- package/dist/runtime/http-transport.d.ts.map +1 -1
- package/dist/runtime/http-transport.js +1 -1
- package/dist/runtime/http-transport.js.map +1 -1
- package/dist/runtime/index.d.ts +2 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +2 -1
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/node.d.ts +7 -23
- package/dist/runtime/node.d.ts.map +1 -1
- package/dist/runtime/node.js +5 -78
- package/dist/runtime/node.js.map +1 -1
- package/dist/runtime/pooled-transport.d.ts +120 -59
- package/dist/runtime/pooled-transport.d.ts.map +1 -1
- package/dist/runtime/pooled-transport.js +345 -78
- package/dist/runtime/pooled-transport.js.map +1 -1
- package/dist/runtime/pyodide-bootstrap-core.generated.d.ts.map +1 -1
- package/dist/runtime/pyodide-bootstrap-core.generated.js +1 -1
- package/dist/runtime/pyodide-bootstrap-core.generated.js.map +1 -1
- package/dist/runtime/pyodide-transport.d.ts +1 -1
- package/dist/runtime/pyodide-transport.d.ts.map +1 -1
- package/dist/runtime/pyodide-transport.js +2 -3
- package/dist/runtime/pyodide-transport.js.map +1 -1
- package/dist/runtime/rpc-client.d.ts +7 -36
- package/dist/runtime/rpc-client.d.ts.map +1 -1
- package/dist/runtime/rpc-client.js +37 -72
- package/dist/runtime/rpc-client.js.map +1 -1
- package/dist/runtime/subprocess-transport.d.ts +134 -8
- package/dist/runtime/subprocess-transport.d.ts.map +1 -1
- package/dist/runtime/subprocess-transport.js +490 -65
- package/dist/runtime/subprocess-transport.js.map +1 -1
- package/dist/runtime/timed-out-request-tracker.d.ts +2 -1
- package/dist/runtime/timed-out-request-tracker.d.ts.map +1 -1
- package/dist/runtime/transport.d.ts +90 -18
- package/dist/runtime/transport.d.ts.map +1 -1
- package/dist/runtime/transport.js +21 -1
- package/dist/runtime/transport.js.map +1 -1
- package/dist/runtime/validators.d.ts +49 -0
- package/dist/runtime/validators.d.ts.map +1 -1
- package/dist/runtime/validators.js +152 -0
- package/dist/runtime/validators.js.map +1 -1
- package/dist/types/index.d.ts +14 -15
- package/dist/types/index.d.ts.map +1 -1
- package/dist/tywrap.d.ts +3 -2
- package/dist/tywrap.d.ts.map +1 -1
- package/dist/tywrap.js +140 -21
- package/dist/tywrap.js.map +1 -1
- package/dist/utils/cache.d.ts +3 -16
- package/dist/utils/cache.d.ts.map +1 -1
- package/dist/utils/codec.d.ts +1 -0
- package/dist/utils/codec.d.ts.map +1 -1
- package/dist/utils/codec.js +165 -17
- package/dist/utils/codec.js.map +1 -1
- package/dist/utils/ir-cache.d.ts +2 -1
- package/dist/utils/ir-cache.d.ts.map +1 -1
- package/dist/utils/runtime.d.ts +0 -29
- package/dist/utils/runtime.d.ts.map +1 -1
- package/dist/utils/runtime.js +16 -107
- package/dist/utils/runtime.js.map +1 -1
- package/dist/version.js +1 -1
- package/package.json +7 -6
- package/runtime/frame_codec.py +430 -0
- package/runtime/python_bridge.py +213 -54
- package/runtime/tywrap_bridge_core.py +217 -147
- package/src/config/index.ts +11 -0
- package/src/core/annotation-parser.ts +9 -5
- package/src/core/emit-call.ts +1 -7
- package/src/core/generator.ts +315 -205
- package/src/core/mapper.ts +8 -8
- package/src/dev.ts +1 -3
- package/src/index.ts +7 -3
- package/src/runtime/base-bridge.ts +5 -30
- package/src/runtime/bounded-context.ts +12 -67
- package/src/runtime/bridge-codec.ts +94 -65
- package/src/runtime/errors.ts +21 -0
- package/src/runtime/frame-codec.ts +469 -0
- package/src/runtime/http-transport.ts +6 -1
- package/src/runtime/index.ts +7 -6
- package/src/runtime/node.ts +17 -104
- package/src/runtime/pooled-transport.ts +424 -90
- package/src/runtime/pyodide-bootstrap-core.generated.ts +1 -1
- package/src/runtime/pyodide-transport.ts +7 -3
- package/src/runtime/rpc-client.ts +58 -93
- package/src/runtime/subprocess-transport.ts +585 -80
- package/src/runtime/timed-out-request-tracker.ts +1 -1
- package/src/runtime/transport.ts +112 -22
- package/src/runtime/validators.ts +204 -0
- package/src/types/index.ts +21 -35
- package/src/tywrap.ts +157 -30
- package/src/utils/cache.ts +3 -3
- package/src/utils/codec.ts +205 -16
- package/src/utils/ir-cache.ts +1 -1
- package/src/utils/runtime.ts +17 -128
- package/src/version.ts +1 -1
- package/dist/core/discovery.d.ts +0 -103
- package/dist/core/discovery.d.ts.map +0 -1
- package/dist/core/discovery.js +0 -380
- package/dist/core/discovery.js.map +0 -1
- package/dist/core/validation.d.ts +0 -102
- package/dist/core/validation.d.ts.map +0 -1
- package/dist/core/validation.js +0 -490
- package/dist/core/validation.js.map +0 -1
- package/dist/runtime/base.d.ts +0 -22
- package/dist/runtime/base.d.ts.map +0 -1
- package/dist/runtime/base.js +0 -23
- package/dist/runtime/base.js.map +0 -1
- package/dist/runtime/transport-pool.d.ts +0 -196
- package/dist/runtime/transport-pool.d.ts.map +0 -1
- package/dist/runtime/transport-pool.js +0 -418
- package/dist/runtime/transport-pool.js.map +0 -1
- package/runtime/__pycache__/_tywrap_member_fixtures.cpython-311.pyc +0 -0
- package/runtime/__pycache__/safe_codec.cpython-311.pyc +0 -0
- package/runtime/__pycache__/tywrap_bridge_core.cpython-311.pyc +0 -0
- package/runtime/safe_codec.py +0 -352
- package/src/core/discovery.ts +0 -477
- package/src/core/validation.ts +0 -729
- package/src/runtime/base.ts +0 -24
- package/src/runtime/transport-pool.ts +0 -538
package/src/utils/runtime.ts
CHANGED
|
@@ -23,13 +23,16 @@ interface RuntimeCapabilities {
|
|
|
23
23
|
|
|
24
24
|
// Cache for runtime detection to avoid repeated environment checks
|
|
25
25
|
let runtimeCache: RuntimeInfo | null = null;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
let runtimeCacheSignature: string | undefined;
|
|
27
|
+
|
|
28
|
+
function currentRuntimeSignature(): string {
|
|
29
|
+
return [
|
|
30
|
+
typeof Deno !== 'undefined' && Deno !== null,
|
|
31
|
+
typeof Bun !== 'undefined' && Bun !== null,
|
|
32
|
+
typeof process !== 'undefined' && process.versions?.node,
|
|
33
|
+
typeof window !== 'undefined' ? window.isSecureContext : undefined,
|
|
34
|
+
typeof self !== 'undefined' ? self.isSecureContext : undefined,
|
|
35
|
+
].join('|');
|
|
33
36
|
}
|
|
34
37
|
|
|
35
38
|
/**
|
|
@@ -37,7 +40,8 @@ export function clearRuntimeCache(): void {
|
|
|
37
40
|
* Results are cached and frozen to prevent external mutation
|
|
38
41
|
*/
|
|
39
42
|
export function detectRuntime(): RuntimeInfo {
|
|
40
|
-
|
|
43
|
+
const signature = currentRuntimeSignature();
|
|
44
|
+
if (runtimeCache && runtimeCacheSignature === signature) {
|
|
41
45
|
return runtimeCache;
|
|
42
46
|
}
|
|
43
47
|
// Deno detection (must come before Node.js check)
|
|
@@ -56,6 +60,7 @@ export function detectRuntime(): RuntimeInfo {
|
|
|
56
60
|
capabilities: Object.freeze(capabilities),
|
|
57
61
|
};
|
|
58
62
|
runtimeCache = Object.freeze(result) as RuntimeInfo;
|
|
63
|
+
runtimeCacheSignature = signature;
|
|
59
64
|
return runtimeCache;
|
|
60
65
|
}
|
|
61
66
|
|
|
@@ -75,6 +80,7 @@ export function detectRuntime(): RuntimeInfo {
|
|
|
75
80
|
capabilities: Object.freeze(capabilities),
|
|
76
81
|
};
|
|
77
82
|
runtimeCache = Object.freeze(result) as RuntimeInfo;
|
|
83
|
+
runtimeCacheSignature = signature;
|
|
78
84
|
return runtimeCache;
|
|
79
85
|
}
|
|
80
86
|
|
|
@@ -94,6 +100,7 @@ export function detectRuntime(): RuntimeInfo {
|
|
|
94
100
|
capabilities: Object.freeze(capabilities),
|
|
95
101
|
};
|
|
96
102
|
runtimeCache = Object.freeze(result) as RuntimeInfo;
|
|
103
|
+
runtimeCacheSignature = signature;
|
|
97
104
|
return runtimeCache;
|
|
98
105
|
}
|
|
99
106
|
|
|
@@ -119,6 +126,7 @@ export function detectRuntime(): RuntimeInfo {
|
|
|
119
126
|
capabilities: Object.freeze(capabilities),
|
|
120
127
|
};
|
|
121
128
|
runtimeCache = Object.freeze(result) as RuntimeInfo;
|
|
129
|
+
runtimeCacheSignature = signature;
|
|
122
130
|
return runtimeCache;
|
|
123
131
|
}
|
|
124
132
|
|
|
@@ -137,6 +145,7 @@ export function detectRuntime(): RuntimeInfo {
|
|
|
137
145
|
|
|
138
146
|
// Cache and freeze the result to prevent external mutation
|
|
139
147
|
runtimeCache = Object.freeze(result) as RuntimeInfo;
|
|
148
|
+
runtimeCacheSignature = signature;
|
|
140
149
|
return runtimeCache;
|
|
141
150
|
}
|
|
142
151
|
|
|
@@ -183,52 +192,6 @@ export function hasCapability(capability: keyof RuntimeCapabilities): boolean {
|
|
|
183
192
|
return getRuntimeCapabilities()[capability];
|
|
184
193
|
}
|
|
185
194
|
|
|
186
|
-
/**
|
|
187
|
-
* Get the best runtime strategy for Python execution
|
|
188
|
-
*/
|
|
189
|
-
export function getBestPythonRuntime(): 'node' | 'pyodide' | 'http' {
|
|
190
|
-
const runtime = detectRuntime();
|
|
191
|
-
|
|
192
|
-
if (runtime.name === 'browser') {
|
|
193
|
-
return 'pyodide';
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
if (runtime.capabilities.subprocess) {
|
|
197
|
-
return 'node'; // Works for Node.js, Deno, and Bun
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
// Fallback to HTTP bridge
|
|
201
|
-
return 'http';
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
type PathModule = typeof import('node:path');
|
|
205
|
-
|
|
206
|
-
// Cache for lazy-loaded path module
|
|
207
|
-
let pathModule: PathModule | null = null;
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* Lazy load Node.js path module on demand
|
|
211
|
-
*/
|
|
212
|
-
async function loadPathModule(): Promise<PathModule | null> {
|
|
213
|
-
if (pathModule) {
|
|
214
|
-
return pathModule;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
const runtime = detectRuntime();
|
|
218
|
-
if (runtime.name === 'node') {
|
|
219
|
-
try {
|
|
220
|
-
pathModule = await import('node:path');
|
|
221
|
-
return pathModule;
|
|
222
|
-
} catch {
|
|
223
|
-
// Fallback for older Node.js versions
|
|
224
|
-
pathModule = await import('path');
|
|
225
|
-
return pathModule;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
return null;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
195
|
/**
|
|
233
196
|
* Apply a single path segment to the accumulated normalized segments,
|
|
234
197
|
* resolving '..' and dropping '.'/empty segments in place.
|
|
@@ -283,30 +246,6 @@ export const pathUtils = {
|
|
|
283
246
|
return normalizePath(joined);
|
|
284
247
|
},
|
|
285
248
|
|
|
286
|
-
/**
|
|
287
|
-
* Join paths asynchronously with enhanced Node.js support
|
|
288
|
-
*/
|
|
289
|
-
async joinAsync(...segments: string[]): Promise<string> {
|
|
290
|
-
const runtime = detectRuntime();
|
|
291
|
-
|
|
292
|
-
// For Node.js, use the real path module when available
|
|
293
|
-
if (runtime.name === 'node') {
|
|
294
|
-
const pathMod = await loadPathModule();
|
|
295
|
-
if (pathMod?.posix) {
|
|
296
|
-
return pathMod.posix.join(...segments);
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
// Fallback implementation with normalization
|
|
301
|
-
const joined = segments
|
|
302
|
-
.filter(Boolean)
|
|
303
|
-
.join('/')
|
|
304
|
-
.replace(/\/+/g, '/') // Replace multiple slashes with single slash
|
|
305
|
-
.replace(/\\/g, '/'); // Normalize backslashes to forward slashes
|
|
306
|
-
|
|
307
|
-
return normalizePath(joined);
|
|
308
|
-
},
|
|
309
|
-
|
|
310
249
|
/**
|
|
311
250
|
* Resolve absolute path in a cross-runtime way (synchronous)
|
|
312
251
|
*/
|
|
@@ -329,27 +268,6 @@ export const pathUtils = {
|
|
|
329
268
|
// Fallback: normalize and return as-is for relative paths
|
|
330
269
|
return normalizePath(path);
|
|
331
270
|
},
|
|
332
|
-
|
|
333
|
-
/**
|
|
334
|
-
* Resolve absolute path in a cross-runtime way (asynchronous)
|
|
335
|
-
*/
|
|
336
|
-
async resolveAsync(path: string): Promise<string> {
|
|
337
|
-
const runtime = detectRuntime();
|
|
338
|
-
|
|
339
|
-
if (runtime.name === 'node') {
|
|
340
|
-
const pathMod = await loadPathModule();
|
|
341
|
-
if (pathMod) {
|
|
342
|
-
return pathMod.resolve(path);
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
if (runtime.name === 'browser') {
|
|
347
|
-
return new URL(path, location.href).href;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
// Fallback: normalize and return as-is
|
|
351
|
-
return normalizePath(path);
|
|
352
|
-
},
|
|
353
271
|
};
|
|
354
272
|
|
|
355
273
|
/**
|
|
@@ -642,28 +560,6 @@ export function isWindows(): boolean {
|
|
|
642
560
|
return deno?.build?.os === 'windows';
|
|
643
561
|
}
|
|
644
562
|
|
|
645
|
-
/**
|
|
646
|
-
* Check if running on macOS
|
|
647
|
-
*/
|
|
648
|
-
export function isMacOS(): boolean {
|
|
649
|
-
if (typeof process !== 'undefined' && process.platform) {
|
|
650
|
-
return process.platform === 'darwin';
|
|
651
|
-
}
|
|
652
|
-
const deno = (globalThis as unknown as { Deno?: { build?: { os?: string } } }).Deno;
|
|
653
|
-
return deno?.build?.os === 'darwin';
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
/**
|
|
657
|
-
* Check if running on Linux
|
|
658
|
-
*/
|
|
659
|
-
export function isLinux(): boolean {
|
|
660
|
-
if (typeof process !== 'undefined' && process.platform) {
|
|
661
|
-
return process.platform === 'linux';
|
|
662
|
-
}
|
|
663
|
-
const deno = (globalThis as unknown as { Deno?: { build?: { os?: string } } }).Deno;
|
|
664
|
-
return deno?.build?.os === 'linux';
|
|
665
|
-
}
|
|
666
|
-
|
|
667
563
|
/**
|
|
668
564
|
* Check if a path is absolute
|
|
669
565
|
*/
|
|
@@ -676,13 +572,6 @@ export function isAbsolutePath(path: string): boolean {
|
|
|
676
572
|
return /^[A-Za-z]:[\\/]/.test(path);
|
|
677
573
|
}
|
|
678
574
|
|
|
679
|
-
/**
|
|
680
|
-
* Get the path separator for the current platform
|
|
681
|
-
*/
|
|
682
|
-
export function getPathSeparator(): string {
|
|
683
|
-
return isWindows() ? '\\' : '/';
|
|
684
|
-
}
|
|
685
|
-
|
|
686
575
|
/**
|
|
687
576
|
* Get the default Python executable name for the current platform
|
|
688
577
|
*/
|
package/src/version.ts
CHANGED
package/dist/core/discovery.d.ts
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Python Module Discovery System
|
|
3
|
-
*
|
|
4
|
-
* Handles module resolution, dependency detection, and file system operations
|
|
5
|
-
* across different runtime environments
|
|
6
|
-
*/
|
|
7
|
-
export interface ModuleInfo {
|
|
8
|
-
name: string;
|
|
9
|
-
path: string;
|
|
10
|
-
version?: string;
|
|
11
|
-
isPackage: boolean;
|
|
12
|
-
dependencies: string[];
|
|
13
|
-
}
|
|
14
|
-
export interface DiscoveryOptions {
|
|
15
|
-
pythonPath?: string;
|
|
16
|
-
virtualEnv?: string;
|
|
17
|
-
searchPaths?: string[];
|
|
18
|
-
excludePatterns?: string[];
|
|
19
|
-
includeStdLib?: boolean;
|
|
20
|
-
timeoutMs?: number;
|
|
21
|
-
}
|
|
22
|
-
export declare class ModuleDiscovery {
|
|
23
|
-
private options;
|
|
24
|
-
private moduleCache;
|
|
25
|
-
private dependencyGraph;
|
|
26
|
-
private pythonExecPromise?;
|
|
27
|
-
constructor(options?: DiscoveryOptions);
|
|
28
|
-
private getPythonExecutable;
|
|
29
|
-
/**
|
|
30
|
-
* Find Python modules from various sources
|
|
31
|
-
*/
|
|
32
|
-
findPythonModules(paths: string[]): Promise<ModuleInfo[]>;
|
|
33
|
-
/**
|
|
34
|
-
* Resolve Python module path from module name
|
|
35
|
-
*/
|
|
36
|
-
resolvePythonPath(moduleName: string): Promise<string | null>;
|
|
37
|
-
/**
|
|
38
|
-
* Resolve a module path by asking the Python interpreter for `__file__`.
|
|
39
|
-
* Caches and returns the resolved path, or `null` when the interpreter is
|
|
40
|
-
* unavailable, reports a builtin, or fails.
|
|
41
|
-
*/
|
|
42
|
-
private resolveViaInterpreter;
|
|
43
|
-
/**
|
|
44
|
-
* Fallback resolution: probe `<path>/<module>.py` and
|
|
45
|
-
* `<path>/<module>/__init__.py` across the known Python search paths.
|
|
46
|
-
* Returns the first existing candidate, or `null`.
|
|
47
|
-
*/
|
|
48
|
-
private resolveViaSearchPaths;
|
|
49
|
-
/**
|
|
50
|
-
* Check if a file is a valid Python file
|
|
51
|
-
*/
|
|
52
|
-
isValidPythonFile(path: string): boolean;
|
|
53
|
-
/**
|
|
54
|
-
* Build dependency graph for modules
|
|
55
|
-
*/
|
|
56
|
-
buildDependencyGraph(modules: ModuleInfo[]): Promise<Map<string, Set<string>>>;
|
|
57
|
-
/**
|
|
58
|
-
* Extract dependencies from Python source file
|
|
59
|
-
*/
|
|
60
|
-
extractDependencies(filePath: string): Promise<string[]>;
|
|
61
|
-
/**
|
|
62
|
-
* Parse import statements from Python source code
|
|
63
|
-
*/
|
|
64
|
-
parseDependenciesFromSource(source: string): string[];
|
|
65
|
-
/**
|
|
66
|
-
* Extract the top-level module name imported by a single (trimmed) source
|
|
67
|
-
* line, or `null` when the line is a comment, blank, or not an import.
|
|
68
|
-
*/
|
|
69
|
-
private extractImportedModule;
|
|
70
|
-
/**
|
|
71
|
-
* Detect circular dependencies
|
|
72
|
-
*/
|
|
73
|
-
detectCircularDependencies(): string[][];
|
|
74
|
-
/**
|
|
75
|
-
* Get Python search paths
|
|
76
|
-
*/
|
|
77
|
-
private getPythonSearchPaths;
|
|
78
|
-
/**
|
|
79
|
-
* Scan a directory path for Python modules
|
|
80
|
-
*/
|
|
81
|
-
private scanPath;
|
|
82
|
-
/**
|
|
83
|
-
* Extract module name from file path
|
|
84
|
-
*/
|
|
85
|
-
private extractModuleNameFromPath;
|
|
86
|
-
/**
|
|
87
|
-
* Get module version information
|
|
88
|
-
*/
|
|
89
|
-
getModuleVersion(moduleName: string): Promise<string | undefined>;
|
|
90
|
-
/**
|
|
91
|
-
* Clear module cache
|
|
92
|
-
*/
|
|
93
|
-
clearCache(): void;
|
|
94
|
-
/**
|
|
95
|
-
* Get cached module information
|
|
96
|
-
*/
|
|
97
|
-
getCachedModule(moduleName: string): ModuleInfo | undefined;
|
|
98
|
-
/**
|
|
99
|
-
* Get dependency graph
|
|
100
|
-
*/
|
|
101
|
-
getDependencyGraph(): Map<string, Set<string>>;
|
|
102
|
-
}
|
|
103
|
-
//# sourceMappingURL=discovery.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../src/core/discovery.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAmCH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,eAAe;IAC1B,OAAO,CAAC,OAAO,CAAmB;IAClC,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,eAAe,CAAkC;IACzD,OAAO,CAAC,iBAAiB,CAAC,CAAkB;gBAEhC,OAAO,GAAE,gBAAqB;YAe5B,mBAAmB;IAQjC;;OAEG;IACG,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAsB/D;;OAEG;IACG,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAkBnE;;;;OAIG;YACW,qBAAqB;IAoCnC;;;;OAIG;YACW,qBAAqB;IAwBnC;;OAEG;IACH,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAkBxC;;OAEG;IACG,oBAAoB,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IAcpF;;OAEG;IACG,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAc9D;;OAEG;IACH,2BAA2B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE;IAarD;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAc7B;;OAEG;IACH,0BAA0B,IAAI,MAAM,EAAE,EAAE;IAuCxC;;OAEG;YACW,oBAAoB;IAyClC;;OAEG;YACW,QAAQ;IA4BtB;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAejC;;OAEG;IACG,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IA0BvE;;OAEG;IACH,UAAU,IAAI,IAAI;IAKlB;;OAEG;IACH,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS;IAI3D;;OAEG;IACH,kBAAkB,IAAI,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAG/C"}
|