UNPKG

@vidavidorra/create-project

Version:
231 lines (230 loc) 7.37 kB
import { z } from 'zod'; import { type Options } from '../options.js'; import { File } from './file.js'; declare const schema: z.ZodObject<{ name: z.ZodString; version: z.ZodString; description: z.ZodString; keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; private: z.ZodOptional<z.ZodBoolean>; homepage: z.ZodString; bugs: z.ZodObject<{ url: z.ZodString; }, "strict", z.ZodTypeAny, { url: string; }, { url: string; }>; repository: z.ZodObject<{ type: z.ZodLiteral<"git">; url: z.ZodString; }, "strict", z.ZodTypeAny, { type: "git"; url: string; }, { type: "git"; url: string; }>; license: z.ZodLiteral<"GPL-3.0-or-later">; author: z.ZodString; type: z.ZodLiteral<"module">; exports: z.ZodOptional<z.ZodString>; bin: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; files: z.ZodOptional<z.ZodTuple<[z.ZodLiteral<"./dist/**/!(*.test).{js,d.ts,cjs}">], z.ZodString>>; scripts: z.ZodObject<{ build: z.ZodString; format: z.ZodString; 'format:check': z.ZodString; lint: z.ZodLiteral<"npm run format:check && xo">; 'lint:fix': z.ZodLiteral<"npm run format && xo --fix">; postinstall: z.ZodOptional<z.ZodString>; prepare: z.ZodLiteral<"husky .github/husky">; test: z.ZodString; }, "strict", z.ZodTypeAny, { format: string; lint: "npm run format:check && xo"; build: string; test: string; 'format:check': string; 'lint:fix': "npm run format && xo --fix"; prepare: "husky .github/husky"; postinstall?: string | undefined; }, { format: string; lint: "npm run format:check && xo"; build: string; test: string; 'format:check': string; 'lint:fix': "npm run format && xo --fix"; prepare: "husky .github/husky"; postinstall?: string | undefined; }>; commitlint: z.ZodRecord<z.ZodString, z.ZodUnknown>; xo: z.ZodRecord<z.ZodString, z.ZodUnknown>; prettier: z.ZodRecord<z.ZodString, z.ZodUnknown>; release: z.ZodRecord<z.ZodString, z.ZodUnknown>; ava: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; c8: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; devDependencies: z.ZodRecord<z.ZodString, z.ZodString>; engines: z.ZodObject<{ node: z.ZodLiteral<">=20">; }, "strict", z.ZodTypeAny, { node: ">=20"; }, { node: ">=20"; }>; publishConfig: z.ZodOptional<z.ZodObject<{ access: z.ZodLiteral<"public">; }, "strict", z.ZodTypeAny, { access: "public"; }, { access: "public"; }>>; overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, "strict", z.ZodTypeAny, { type: "module"; description: string; author: string; name: string; release: Record<string, unknown>; version: string; homepage: string; bugs: { url: string; }; repository: { type: "git"; url: string; }; license: "GPL-3.0-or-later"; prettier: Record<string, unknown>; scripts: { format: string; lint: "npm run format:check && xo"; build: string; test: string; 'format:check': string; 'lint:fix': "npm run format && xo --fix"; prepare: "husky .github/husky"; postinstall?: string | undefined; }; commitlint: Record<string, unknown>; xo: Record<string, unknown>; devDependencies: Record<string, string>; engines: { node: ">=20"; }; files?: ["./dist/**/!(*.test).{js,d.ts,cjs}", ...string[]] | undefined; ava?: Record<string, unknown> | undefined; keywords?: string[] | undefined; private?: boolean | undefined; exports?: string | undefined; bin?: Record<string, unknown> | undefined; c8?: Record<string, unknown> | undefined; dependencies?: Record<string, string> | undefined; publishConfig?: { access: "public"; } | undefined; overrides?: Record<string, unknown> | undefined; }, { type: "module"; description: string; author: string; name: string; release: Record<string, unknown>; version: string; homepage: string; bugs: { url: string; }; repository: { type: "git"; url: string; }; license: "GPL-3.0-or-later"; prettier: Record<string, unknown>; scripts: { format: string; lint: "npm run format:check && xo"; build: string; test: string; 'format:check': string; 'lint:fix': "npm run format && xo --fix"; prepare: "husky .github/husky"; postinstall?: string | undefined; }; commitlint: Record<string, unknown>; xo: Record<string, unknown>; devDependencies: Record<string, string>; engines: { node: ">=20"; }; files?: ["./dist/**/!(*.test).{js,d.ts,cjs}", ...string[]] | undefined; ava?: Record<string, unknown> | undefined; keywords?: string[] | undefined; private?: boolean | undefined; exports?: string | undefined; bin?: Record<string, unknown> | undefined; c8?: Record<string, unknown> | undefined; dependencies?: Record<string, string> | undefined; publishConfig?: { access: "public"; } | undefined; overrides?: Record<string, unknown> | undefined; }>; type PackageJson = z.infer<typeof schema>; declare class Package extends File { protected readonly _fullPackage: Required<PackageJson>; protected readonly _package: PackageJson; constructor(path: string, options: Options); get package(): { type: "module"; description: string; author: string; name: string; release: Record<string, unknown>; version: string; homepage: string; bugs: { url: string; }; repository: { type: "git"; url: string; }; license: "GPL-3.0-or-later"; prettier: Record<string, unknown>; scripts: { format: string; lint: "npm run format:check && xo"; build: string; test: string; 'format:check': string; 'lint:fix': "npm run format && xo --fix"; prepare: "husky .github/husky"; postinstall?: string | undefined; }; commitlint: Record<string, unknown>; xo: Record<string, unknown>; devDependencies: Record<string, string>; engines: { node: ">=20"; }; files?: ["./dist/**/!(*.test).{js,d.ts,cjs}", ...string[]] | undefined; ava?: Record<string, unknown> | undefined; keywords?: string[] | undefined; private?: boolean | undefined; exports?: string | undefined; bin?: Record<string, unknown> | undefined; c8?: Record<string, unknown> | undefined; dependencies?: Record<string, string> | undefined; publishConfig?: { access: "public"; } | undefined; overrides?: Record<string, unknown> | undefined; }; process(): this; private get gitHubUrl(); } export { Package, type PackageJson };