// src/index.ts import path from "node:path"; import fs from "node:fs/promises"; import { glob } from "glob"; var workspacePaths = async ({ cwd, includeRoot }) => { const currentDirectory = cwd || process.cwd(); const packageJsonPath = path.join(currentDirectory, "package.json"); const packageJsonContent = await fs.readFile(packageJsonPath, "utf8"); const packageJson = JSON.parse(packageJsonContent); const workspaces = packageJson.workspaces || []; const workspacePaths2 = (await Promise.all(workspaces.map((workspace) => glob(path.join(currentDirectory, workspace))))).flat(); if (includeRoot) workspacePaths2.push(currentDirectory); return workspacePaths2; }; var src_default = workspacePaths; export { workspacePaths, src_default };