@vercel/python-analysis 0.15.2 → 0.15.3

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.cjs CHANGED
@@ -732,6 +732,7 @@ __export(src_exports, {
732
732
  isWheelCompatible: () => isWheelCompatible,
733
733
  normalizePackageName: () => normalizePackageName2,
734
734
  parsePep508: () => parsePep508,
735
+ parseRequirementsFile: () => parseRequirementsFile,
735
736
  parseUvLock: () => parseUvLock,
736
737
  scanDistributions: () => scanDistributions,
737
738
  selectPython: () => selectPython,
@@ -3358,6 +3359,7 @@ var HashDigestSchema = hashDigestSchema;
3358
3359
  isWheelCompatible,
3359
3360
  normalizePackageName,
3360
3361
  parsePep508,
3362
+ parseRequirementsFile,
3361
3363
  parseUvLock,
3362
3364
  scanDistributions,
3363
3365
  selectPython,
package/dist/index.d.ts CHANGED
@@ -30,3 +30,4 @@ export { DependencySourceSchema, HashDigestSchema, NormalizedRequirementSchema,
30
30
  export type { DependencySource, HashDigest, NormalizedRequirement, } from './manifest/requirement/types';
31
31
  export { parsePep508 } from './manifest/pep508';
32
32
  export { PythonBuild, PythonConstraint, PythonImplementation, PythonPlatformRequest, PythonRequest, PythonVariant, PythonVersion, PythonVersionRequest, UnknownPythonImplementation, } from './manifest/python-specifiers';
33
+ export { parseRequirementsFile } from './manifest/requirements-txt-parser';
package/dist/index.js CHANGED
@@ -3291,6 +3291,7 @@ export {
3291
3291
  isWheelCompatible,
3292
3292
  normalizePackageName2 as normalizePackageName,
3293
3293
  parsePep508,
3294
+ parseRequirementsFile,
3294
3295
  parseUvLock,
3295
3296
  scanDistributions,
3296
3297
  selectPython,
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Host-side implementation of the `vercel:python-analysis/host-utils` WIT interface.
3
+ */
4
+ import { AsyncLocalStorage } from 'node:async_hooks';
5
+ /**
6
+ * Function type for reading referenced requirement files.
7
+ */
8
+ export type ReadFileFn = (path: string) => string | null;
9
+ export interface ReadFileContext {
10
+ readFile: ReadFileFn;
11
+ workingDir?: string;
12
+ }
13
+ export declare const readFileStorage: AsyncLocalStorage<ReadFileContext>;
14
+ export declare function createHostUtils(): {
15
+ readFile(path: string): string;
16
+ domainToAscii(domain: string): string;
17
+ domainToUnicode(domain: string): [string, boolean];
18
+ nfcNormalize(s: string): string;
19
+ nfdNormalize(s: string): string;
20
+ nfkcNormalize(s: string): string;
21
+ nfkdNormalize(s: string): string;
22
+ };
@@ -0,0 +1,4 @@
1
+ type ModuleType = typeof import('#wasm/vercel_python_analysis.js');
2
+ type RootType = Awaited<ReturnType<ModuleType['instantiate']>>;
3
+ export declare function importWasmModule(): Promise<RootType>;
4
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/python-analysis",
3
- "version": "0.15.2",
3
+ "version": "0.15.3",
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",