@vercel/python-analysis 0.1.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.
Files changed (54) hide show
  1. package/LICENSE +202 -0
  2. package/dist/index.d.ts +22 -0
  3. package/dist/index.js +107 -0
  4. package/dist/manifest/package.d.ts +166 -0
  5. package/dist/manifest/package.js +422 -0
  6. package/dist/manifest/pep440.d.ts +6 -0
  7. package/dist/manifest/pep440.js +63 -0
  8. package/dist/manifest/pep508.d.ts +64 -0
  9. package/dist/manifest/pep508.js +70 -0
  10. package/dist/manifest/pipfile/schema.d.ts +40 -0
  11. package/dist/manifest/pipfile/schema.js +44 -0
  12. package/dist/manifest/pipfile/schema.zod.d.ts +606 -0
  13. package/dist/manifest/pipfile/schema.zod.js +97 -0
  14. package/dist/manifest/pipfile/types.d.ts +77 -0
  15. package/dist/manifest/pipfile/types.js +16 -0
  16. package/dist/manifest/pipfile-parser.d.ts +35 -0
  17. package/dist/manifest/pipfile-parser.js +262 -0
  18. package/dist/manifest/pyproject/schema.d.ts +50 -0
  19. package/dist/manifest/pyproject/schema.js +56 -0
  20. package/dist/manifest/pyproject/schema.zod.d.ts +767 -0
  21. package/dist/manifest/pyproject/schema.zod.js +94 -0
  22. package/dist/manifest/pyproject/types.d.ts +93 -0
  23. package/dist/manifest/pyproject/types.js +16 -0
  24. package/dist/manifest/python-selector.d.ts +123 -0
  25. package/dist/manifest/python-selector.js +185 -0
  26. package/dist/manifest/python-specifiers.d.ts +76 -0
  27. package/dist/manifest/python-specifiers.js +156 -0
  28. package/dist/manifest/requirement/schema.d.ts +28 -0
  29. package/dist/manifest/requirement/schema.js +35 -0
  30. package/dist/manifest/requirement/schema.zod.d.ts +76 -0
  31. package/dist/manifest/requirement/schema.zod.js +49 -0
  32. package/dist/manifest/requirement/types.d.ts +50 -0
  33. package/dist/manifest/requirement/types.js +16 -0
  34. package/dist/manifest/requirements-txt-parser.d.ts +55 -0
  35. package/dist/manifest/requirements-txt-parser.js +400 -0
  36. package/dist/manifest/uv-config/schema.d.ts +22 -0
  37. package/dist/manifest/uv-config/schema.js +35 -0
  38. package/dist/manifest/uv-config/schema.zod.d.ts +140 -0
  39. package/dist/manifest/uv-config/schema.zod.js +48 -0
  40. package/dist/manifest/uv-config/types.d.ts +48 -0
  41. package/dist/manifest/uv-config/types.js +16 -0
  42. package/dist/manifest/uv-python-version-parser.d.ts +28 -0
  43. package/dist/manifest/uv-python-version-parser.js +268 -0
  44. package/dist/types.d.ts +17 -0
  45. package/dist/types.js +16 -0
  46. package/dist/util/config.d.ts +20 -0
  47. package/dist/util/config.js +100 -0
  48. package/dist/util/error.d.ts +39 -0
  49. package/dist/util/error.js +54 -0
  50. package/dist/util/fs.d.ts +25 -0
  51. package/dist/util/fs.js +75 -0
  52. package/dist/util/type.d.ts +7 -0
  53. package/dist/util/type.js +30 -0
  54. package/package.json +43 -0
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var schema_zod_exports = {};
20
+ __export(schema_zod_exports, {
21
+ pipfileDependencyDetailSchema: () => pipfileDependencyDetailSchema,
22
+ pipfileDependencySchema: () => pipfileDependencySchema,
23
+ pipfileLikeSchema: () => pipfileLikeSchema,
24
+ pipfileLockLikeSchema: () => pipfileLockLikeSchema,
25
+ pipfileLockMetaSchema: () => pipfileLockMetaSchema,
26
+ pipfileSourceSchema: () => pipfileSourceSchema
27
+ });
28
+ module.exports = __toCommonJS(schema_zod_exports);
29
+ var import_zod = require("zod");
30
+ const pipfileDependencyDetailSchema = import_zod.z.object({
31
+ version: import_zod.z.string().optional(),
32
+ hashes: import_zod.z.array(import_zod.z.string()).optional(),
33
+ extras: import_zod.z.union([import_zod.z.array(import_zod.z.string()), import_zod.z.string()]).optional(),
34
+ markers: import_zod.z.string().optional(),
35
+ index: import_zod.z.string().optional(),
36
+ git: import_zod.z.string().optional(),
37
+ ref: import_zod.z.string().optional(),
38
+ editable: import_zod.z.boolean().optional(),
39
+ path: import_zod.z.string().optional()
40
+ });
41
+ const pipfileDependencySchema = import_zod.z.union([
42
+ import_zod.z.string(),
43
+ pipfileDependencyDetailSchema
44
+ ]);
45
+ const pipfileSourceSchema = import_zod.z.object({
46
+ name: import_zod.z.string(),
47
+ url: import_zod.z.string(),
48
+ verify_ssl: import_zod.z.boolean().optional()
49
+ });
50
+ const pipfileLikeSchema = import_zod.z.record(
51
+ import_zod.z.union([
52
+ import_zod.z.record(pipfileDependencySchema),
53
+ import_zod.z.array(pipfileSourceSchema),
54
+ import_zod.z.record(import_zod.z.string()),
55
+ import_zod.z.undefined()
56
+ ])
57
+ ).and(
58
+ import_zod.z.object({
59
+ packages: import_zod.z.record(pipfileDependencySchema).optional(),
60
+ "dev-packages": import_zod.z.record(pipfileDependencySchema).optional(),
61
+ source: import_zod.z.array(pipfileSourceSchema).optional(),
62
+ scripts: import_zod.z.record(import_zod.z.string()).optional()
63
+ })
64
+ );
65
+ const pipfileLockMetaSchema = import_zod.z.object({
66
+ hash: import_zod.z.object({
67
+ sha256: import_zod.z.string().optional()
68
+ }).optional(),
69
+ "pipfile-spec": import_zod.z.number().optional(),
70
+ requires: import_zod.z.object({
71
+ python_version: import_zod.z.string().optional(),
72
+ python_full_version: import_zod.z.string().optional()
73
+ }).optional(),
74
+ sources: import_zod.z.array(pipfileSourceSchema).optional()
75
+ });
76
+ const pipfileLockLikeSchema = import_zod.z.record(
77
+ import_zod.z.union([
78
+ pipfileLockMetaSchema,
79
+ import_zod.z.record(pipfileDependencyDetailSchema),
80
+ import_zod.z.undefined()
81
+ ])
82
+ ).and(
83
+ import_zod.z.object({
84
+ _meta: pipfileLockMetaSchema.optional(),
85
+ default: import_zod.z.record(pipfileDependencyDetailSchema).optional(),
86
+ develop: import_zod.z.record(pipfileDependencyDetailSchema).optional()
87
+ })
88
+ );
89
+ // Annotate the CommonJS export names for ESM import in node:
90
+ 0 && (module.exports = {
91
+ pipfileDependencyDetailSchema,
92
+ pipfileDependencySchema,
93
+ pipfileLikeSchema,
94
+ pipfileLockLikeSchema,
95
+ pipfileLockMetaSchema,
96
+ pipfileSourceSchema
97
+ });
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Pure TypeScript interface definitions for Pipfile and Pipfile.lock types.
3
+ *
4
+ * These interfaces serve as the source of truth for types.
5
+ * Zod schemas are generated from these using ts-to-zod.
6
+ *
7
+ * @module pipfile/types
8
+ */
9
+ /**
10
+ * Pipfile dependency detail object.
11
+ * @passthrough
12
+ */
13
+ export interface PipfileDependencyDetail {
14
+ version?: string;
15
+ hashes?: string[];
16
+ extras?: string[] | string;
17
+ markers?: string;
18
+ index?: string;
19
+ git?: string;
20
+ ref?: string;
21
+ editable?: boolean;
22
+ path?: string;
23
+ }
24
+ /**
25
+ * Pipfile dependency (string version specifier or detail object).
26
+ */
27
+ export type PipfileDependency = string | PipfileDependencyDetail;
28
+ /**
29
+ * Pipfile source configuration.
30
+ * @passthrough
31
+ */
32
+ export interface PipfileSource {
33
+ name: string;
34
+ url: string;
35
+ verify_ssl?: boolean;
36
+ }
37
+ /**
38
+ * Pipfile configuration.
39
+ * @passthrough
40
+ */
41
+ export interface PipfileLike {
42
+ packages?: Record<string, PipfileDependency>;
43
+ 'dev-packages'?: Record<string, PipfileDependency>;
44
+ source?: PipfileSource[];
45
+ scripts?: Record<string, string>;
46
+ /** Allow additional category keys (custom dependency groups) */
47
+ [key: string]: Record<string, PipfileDependency> | PipfileSource[] | Record<string, string> | undefined;
48
+ }
49
+ /**
50
+ * Pipfile.lock _meta section.
51
+ * @passthrough
52
+ */
53
+ export interface PipfileLockMeta {
54
+ hash?: {
55
+ sha256?: string;
56
+ };
57
+ 'pipfile-spec'?: number;
58
+ requires?: {
59
+ python_version?: string;
60
+ python_full_version?: string;
61
+ };
62
+ sources?: PipfileSource[];
63
+ }
64
+ /**
65
+ * Pipfile.lock configuration.
66
+ *
67
+ * Note: This schema allows additional category keys (like custom dependency groups)
68
+ * which can contain package dictionaries.
69
+ * @passthrough
70
+ */
71
+ export interface PipfileLockLike {
72
+ _meta?: PipfileLockMeta;
73
+ default?: Record<string, PipfileDependencyDetail>;
74
+ develop?: Record<string, PipfileDependencyDetail>;
75
+ /** Allow additional category keys (custom dependency groups) */
76
+ [key: string]: PipfileLockMeta | Record<string, PipfileDependencyDetail> | undefined;
77
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var types_exports = {};
16
+ module.exports = __toCommonJS(types_exports);
@@ -0,0 +1,35 @@
1
+ import type { PyProjectToml } from './pyproject/types';
2
+ import type { PipfileLike, PipfileLockLike } from './pipfile/types';
3
+ /**
4
+ * Migrate a parsed Pipfile to a pyproject.toml object suitable for uv.
5
+ *
6
+ * This creates a minimal pyproject:
7
+ *
8
+ * [project]
9
+ * dependencies = [...]
10
+ *
11
+ * [dependency-groups]
12
+ * dev = [...]
13
+ *
14
+ * [tool.uv.sources] + [[tool.uv.index]]
15
+ */
16
+ export declare function convertPipfileToPyprojectToml(pipfile: PipfileLike): PyProjectToml;
17
+ /**
18
+ * Migrate a parsed Pipfile.lock to a pyproject.toml object suitable for uv.
19
+ *
20
+ * Pipfile.lock uses different key names than Pipfile:
21
+ * - "default" instead of "packages"
22
+ * - "develop" instead of "dev-packages"
23
+ * - Custom categories use the same name in both files
24
+ *
25
+ * This creates a minimal pyproject:
26
+ *
27
+ * [project]
28
+ * dependencies = [...]
29
+ *
30
+ * [dependency-groups]
31
+ * dev = [...]
32
+ *
33
+ * [tool.uv.sources] + [[tool.uv.index]]
34
+ */
35
+ export declare function convertPipfileLockToPyprojectToml(pipfileLock: PipfileLockLike): PyProjectToml;
@@ -0,0 +1,262 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var pipfile_parser_exports = {};
20
+ __export(pipfile_parser_exports, {
21
+ convertPipfileLockToPyprojectToml: () => convertPipfileLockToPyprojectToml,
22
+ convertPipfileToPyprojectToml: () => convertPipfileToPyprojectToml
23
+ });
24
+ module.exports = __toCommonJS(pipfile_parser_exports);
25
+ var import_pep508 = require("./pep508");
26
+ var import_type = require("../util/type");
27
+ const PYPI_INDEX_NAME = "pypi";
28
+ function addDepSource(sources, dep) {
29
+ if (!dep.source) {
30
+ return;
31
+ }
32
+ if (Object.prototype.hasOwnProperty.call(sources, dep.name)) {
33
+ sources[dep.name].push(dep.source);
34
+ } else {
35
+ sources[dep.name] = [dep.source];
36
+ }
37
+ }
38
+ function isPypiSource(source) {
39
+ return typeof source?.name === "string" && source.name === PYPI_INDEX_NAME;
40
+ }
41
+ function processIndexSources(sources) {
42
+ const hasPypi = sources.some(isPypiSource);
43
+ const setExplicit = sources.length > 1 && hasPypi;
44
+ const indexes = [];
45
+ for (const source of sources) {
46
+ if (isPypiSource(source)) {
47
+ continue;
48
+ }
49
+ const entry = {
50
+ name: source.name,
51
+ url: source.url
52
+ };
53
+ if (setExplicit) {
54
+ entry.explicit = true;
55
+ }
56
+ indexes.push(entry);
57
+ }
58
+ return indexes;
59
+ }
60
+ function buildUvToolSection(sources, indexes) {
61
+ const uv = {};
62
+ if (indexes.length > 0) {
63
+ uv.index = indexes;
64
+ }
65
+ if (Object.keys(sources).length > 0) {
66
+ uv.sources = sources;
67
+ }
68
+ return Object.keys(uv).length > 0 ? uv : null;
69
+ }
70
+ function pipfileDepsToRequirements(entries) {
71
+ const deps = [];
72
+ for (const [name, properties] of Object.entries(entries)) {
73
+ const dep = pipfileDepToRequirement(name, properties);
74
+ deps.push(dep);
75
+ }
76
+ return deps;
77
+ }
78
+ function pipfileDepToRequirement(spec, properties) {
79
+ const [name, extrasFromName] = (0, import_pep508.splitExtras)(spec);
80
+ const dep = { name };
81
+ if (extrasFromName && extrasFromName.length > 0) {
82
+ dep.extras = extrasFromName;
83
+ }
84
+ if (typeof properties === "string") {
85
+ dep.version = properties;
86
+ } else if (properties && typeof properties === "object") {
87
+ if (properties.version) {
88
+ dep.version = properties.version;
89
+ }
90
+ if (properties.extras) {
91
+ dep.extras = (0, import_pep508.mergeExtras)(dep.extras, properties.extras);
92
+ }
93
+ if (properties.markers) {
94
+ dep.markers = properties.markers;
95
+ }
96
+ const source = buildDependencySource(properties);
97
+ if (source) {
98
+ dep.source = source;
99
+ }
100
+ }
101
+ return dep;
102
+ }
103
+ function pipfileLockDepsToRequirements(entries) {
104
+ const deps = [];
105
+ for (const [name, properties] of Object.entries(entries)) {
106
+ const dep = pipfileLockDepToRequirement(name, properties);
107
+ deps.push(dep);
108
+ }
109
+ return deps;
110
+ }
111
+ function pipfileLockDepToRequirement(spec, properties) {
112
+ const [name, extrasFromName] = (0, import_pep508.splitExtras)(spec);
113
+ const dep = { name };
114
+ if (extrasFromName && extrasFromName.length > 0) {
115
+ dep.extras = extrasFromName;
116
+ }
117
+ if (properties.version) {
118
+ dep.version = properties.version;
119
+ }
120
+ if (properties.extras) {
121
+ dep.extras = (0, import_pep508.mergeExtras)(dep.extras, properties.extras);
122
+ }
123
+ if (properties.markers) {
124
+ dep.markers = properties.markers;
125
+ }
126
+ const source = buildDependencySource(properties);
127
+ if (source) {
128
+ dep.source = source;
129
+ }
130
+ return dep;
131
+ }
132
+ function buildDependencySource(properties) {
133
+ const source = {};
134
+ if (properties.index && properties.index !== PYPI_INDEX_NAME) {
135
+ source.index = properties.index;
136
+ }
137
+ if (properties.git) {
138
+ source.git = properties.git;
139
+ if (properties.ref) {
140
+ source.rev = properties.ref;
141
+ }
142
+ }
143
+ if (properties.path) {
144
+ source.path = properties.path;
145
+ if (properties.editable) {
146
+ source.editable = true;
147
+ }
148
+ }
149
+ return Object.keys(source).length > 0 ? source : null;
150
+ }
151
+ function convertPipfileToPyprojectToml(pipfile) {
152
+ const sources = {};
153
+ const pyproject = {};
154
+ const deps = [];
155
+ for (const dep of pipfileDepsToRequirements(pipfile.packages || {})) {
156
+ deps.push((0, import_pep508.formatPep508)(dep));
157
+ addDepSource(sources, dep);
158
+ }
159
+ if (deps.length > 0) {
160
+ pyproject.project = {
161
+ dependencies: deps
162
+ };
163
+ }
164
+ const devDeps = [];
165
+ for (const dep of pipfileDepsToRequirements(pipfile["dev-packages"] || {})) {
166
+ devDeps.push((0, import_pep508.formatPep508)(dep));
167
+ addDepSource(sources, dep);
168
+ }
169
+ if (devDeps.length > 0) {
170
+ pyproject["dependency-groups"] = {
171
+ dev: devDeps
172
+ };
173
+ }
174
+ const RESERVED_KEYS = /* @__PURE__ */ new Set([
175
+ "packages",
176
+ "dev-packages",
177
+ "source",
178
+ "scripts",
179
+ "requires",
180
+ "pipenv"
181
+ ]);
182
+ for (const [sectionName, value] of Object.entries(pipfile)) {
183
+ if (RESERVED_KEYS.has(sectionName))
184
+ continue;
185
+ if (!(0, import_type.isPlainObject)(value))
186
+ continue;
187
+ const groupDeps = [];
188
+ for (const dep of pipfileDepsToRequirements(
189
+ value
190
+ )) {
191
+ groupDeps.push((0, import_pep508.formatPep508)(dep));
192
+ addDepSource(sources, dep);
193
+ }
194
+ if (groupDeps.length > 0) {
195
+ pyproject["dependency-groups"] = {
196
+ ...pyproject["dependency-groups"] || {},
197
+ [sectionName]: groupDeps
198
+ };
199
+ }
200
+ }
201
+ const indexes = processIndexSources(pipfile.source ?? []);
202
+ const uv = buildUvToolSection(sources, indexes);
203
+ if (uv) {
204
+ pyproject.tool = { uv };
205
+ }
206
+ return pyproject;
207
+ }
208
+ function convertPipfileLockToPyprojectToml(pipfileLock) {
209
+ const sources = {};
210
+ const pyproject = {};
211
+ const deps = [];
212
+ for (const dep of pipfileLockDepsToRequirements(pipfileLock.default || {})) {
213
+ deps.push((0, import_pep508.formatPep508)(dep));
214
+ addDepSource(sources, dep);
215
+ }
216
+ if (deps.length > 0) {
217
+ pyproject.project = {
218
+ dependencies: deps
219
+ };
220
+ }
221
+ const devDeps = [];
222
+ for (const dep of pipfileLockDepsToRequirements(pipfileLock.develop || {})) {
223
+ devDeps.push((0, import_pep508.formatPep508)(dep));
224
+ addDepSource(sources, dep);
225
+ }
226
+ if (devDeps.length > 0) {
227
+ pyproject["dependency-groups"] = {
228
+ dev: devDeps
229
+ };
230
+ }
231
+ const RESERVED_KEYS = /* @__PURE__ */ new Set(["_meta", "default", "develop"]);
232
+ for (const [sectionName, value] of Object.entries(pipfileLock)) {
233
+ if (RESERVED_KEYS.has(sectionName))
234
+ continue;
235
+ if (!(0, import_type.isPlainObject)(value))
236
+ continue;
237
+ const groupDeps = [];
238
+ for (const dep of pipfileLockDepsToRequirements(
239
+ value
240
+ )) {
241
+ groupDeps.push((0, import_pep508.formatPep508)(dep));
242
+ addDepSource(sources, dep);
243
+ }
244
+ if (groupDeps.length > 0) {
245
+ pyproject["dependency-groups"] = {
246
+ ...pyproject["dependency-groups"] || {},
247
+ [sectionName]: groupDeps
248
+ };
249
+ }
250
+ }
251
+ const indexes = processIndexSources(pipfileLock._meta?.sources ?? []);
252
+ const uv = buildUvToolSection(sources, indexes);
253
+ if (uv) {
254
+ pyproject.tool = { uv };
255
+ }
256
+ return pyproject;
257
+ }
258
+ // Annotate the CommonJS export names for ESM import in node:
259
+ 0 && (module.exports = {
260
+ convertPipfileLockToPyprojectToml,
261
+ convertPipfileToPyprojectToml
262
+ });
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Zod schemas for pyproject.toml configuration types.
3
+ *
4
+ * Types are defined in types.ts (source of truth).
5
+ * Schemas are generated by ts-to-zod and re-exported here with proper typing.
6
+ *
7
+ * @module pyproject/schema
8
+ */
9
+ import type { z } from 'zod';
10
+ import type { License, LicenseObject, Person, PyProjectBuildSystem, PyProjectDependencyGroups, PyProjectProject, PyProjectToml, PyProjectToolSection, Readme, ReadmeObject } from './types';
11
+ /**
12
+ * Schema for [build-system] per PEP 518.
13
+ */
14
+ export declare const PyProjectBuildSystemSchema: z.ZodType<PyProjectBuildSystem, z.ZodTypeDef, PyProjectBuildSystem>;
15
+ /**
16
+ * Schema for author/maintainer entries.
17
+ */
18
+ export declare const PersonSchema: z.ZodType<Person, z.ZodTypeDef, Person>;
19
+ /**
20
+ * Schema for readme field as an object.
21
+ */
22
+ export declare const ReadmeObjectSchema: z.ZodType<ReadmeObject, z.ZodTypeDef, ReadmeObject>;
23
+ /**
24
+ * Schema for readme field (can be string or object).
25
+ */
26
+ export declare const ReadmeSchema: z.ZodType<Readme, z.ZodTypeDef, Readme>;
27
+ /**
28
+ * Schema for license field as an object.
29
+ */
30
+ export declare const LicenseObjectSchema: z.ZodType<LicenseObject, z.ZodTypeDef, LicenseObject>;
31
+ /**
32
+ * Schema for license field (can be string or object).
33
+ */
34
+ export declare const LicenseSchema: z.ZodType<License, z.ZodTypeDef, License>;
35
+ /**
36
+ * Schema for core PEP 621 fields for [project].
37
+ */
38
+ export declare const PyProjectProjectSchema: z.ZodType<PyProjectProject, z.ZodTypeDef, PyProjectProject>;
39
+ /**
40
+ * Schema for [dependency-groups].
41
+ */
42
+ export declare const PyProjectDependencyGroupsSchema: z.ZodType<PyProjectDependencyGroups, z.ZodTypeDef, PyProjectDependencyGroups>;
43
+ /**
44
+ * Schema for [tool.FOO] section.
45
+ */
46
+ export declare const PyProjectToolSectionSchema: z.ZodType<PyProjectToolSection, z.ZodTypeDef, PyProjectToolSection>;
47
+ /**
48
+ * Schema for a pyproject.toml file.
49
+ */
50
+ export declare const PyProjectTomlSchema: z.ZodType<PyProjectToml, z.ZodTypeDef, PyProjectToml>;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var schema_exports = {};
20
+ __export(schema_exports, {
21
+ LicenseObjectSchema: () => LicenseObjectSchema,
22
+ LicenseSchema: () => LicenseSchema,
23
+ PersonSchema: () => PersonSchema,
24
+ PyProjectBuildSystemSchema: () => PyProjectBuildSystemSchema,
25
+ PyProjectDependencyGroupsSchema: () => PyProjectDependencyGroupsSchema,
26
+ PyProjectProjectSchema: () => PyProjectProjectSchema,
27
+ PyProjectTomlSchema: () => PyProjectTomlSchema,
28
+ PyProjectToolSectionSchema: () => PyProjectToolSectionSchema,
29
+ ReadmeObjectSchema: () => ReadmeObjectSchema,
30
+ ReadmeSchema: () => ReadmeSchema
31
+ });
32
+ module.exports = __toCommonJS(schema_exports);
33
+ var import_schema = require("./schema.zod");
34
+ const PyProjectBuildSystemSchema = import_schema.pyProjectBuildSystemSchema.passthrough();
35
+ const PersonSchema = import_schema.personSchema.passthrough();
36
+ const ReadmeObjectSchema = import_schema.readmeObjectSchema.passthrough();
37
+ const ReadmeSchema = import_schema.readmeSchema;
38
+ const LicenseObjectSchema = import_schema.licenseObjectSchema.passthrough();
39
+ const LicenseSchema = import_schema.licenseSchema;
40
+ const PyProjectProjectSchema = import_schema.pyProjectProjectSchema.passthrough();
41
+ const PyProjectDependencyGroupsSchema = import_schema.pyProjectDependencyGroupsSchema;
42
+ const PyProjectToolSectionSchema = import_schema.pyProjectToolSectionSchema.passthrough();
43
+ const PyProjectTomlSchema = import_schema.pyProjectTomlSchema.passthrough();
44
+ // Annotate the CommonJS export names for ESM import in node:
45
+ 0 && (module.exports = {
46
+ LicenseObjectSchema,
47
+ LicenseSchema,
48
+ PersonSchema,
49
+ PyProjectBuildSystemSchema,
50
+ PyProjectDependencyGroupsSchema,
51
+ PyProjectProjectSchema,
52
+ PyProjectTomlSchema,
53
+ PyProjectToolSectionSchema,
54
+ ReadmeObjectSchema,
55
+ ReadmeSchema
56
+ });