import { Schema } from "effect"; import { Bool, Str, entry } from "./schemas.js"; /** The `pnpm init` defaults, which pnpm documents with the command (`cli/init`). */ export const init = { initAuthorEmail: entry("initAuthorEmail", { schema: Str, kind: "string", description: "The email part of the author `pnpm init` writes.", summary: "The author email pnpm init writes.", locations: ["workspace", "global", "env"], envFormat: "text", anchor: "cli/init#initauthorname-initauthoremail-initauthorurl", }), initAuthorName: entry("initAuthorName", { schema: Str, kind: "string", description: "The name part of the `name (url)` author `pnpm init` writes.", summary: "The author name pnpm init writes.", locations: ["workspace", "global", "env"], envFormat: "text", anchor: "cli/init#initauthorname-initauthoremail-initauthorurl", }), initAuthorUrl: entry("initAuthorUrl", { schema: Str, kind: "string", description: "The URL part of the author `pnpm init` writes.", summary: "The author URL pnpm init writes.", locations: ["workspace", "global", "env"], envFormat: "text", anchor: "cli/init#initauthorname-initauthoremail-initauthorurl", }), initLicense: entry("initLicense", { schema: Str, kind: "string", description: "The `license` field `pnpm init` writes, in place of `ISC`.", summary: "The license pnpm init writes in place of ISC.", locations: ["workspace", "global", "env"], envFormat: "text", anchor: "cli/init#initlicense", }), initPackageManager: entry("initPackageManager", { schema: Bool, kind: "boolean", description: "Whether `pnpm init` pins a pnpm version in the manifest it scaffolds, through `devEngines.packageManager` and the `packageManager` field.", summary: "Whether pnpm init pins the pnpm version in the manifest it creates.", locations: ["workspace", "global", "env"], envFormat: "json", default: true, anchor: "cli/init#initpackagemanager", }), initType: entry("initType", { schema: Schema.Literals(["module", "commonjs"]), kind: "enum", description: "The module system (`module` or `commonjs`) `pnpm init` records for the package it scaffolds.", summary: "The module type, module or commonjs, that pnpm init writes.", locations: ["workspace", "global", "env"], envFormat: "jsonOrText", anchor: "cli/init#inittype", }), initVersion: entry("initVersion", { schema: Str, kind: "string", description: "The `version` field `pnpm init` writes, in place of `1.0.0`.", summary: "The version pnpm init writes in place of 1.0.0.", locations: ["workspace", "global", "env"], envFormat: "text", anchor: "cli/init#initversion", }), } as const;