aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/packages/turbo-workspaces/src/getWorkspaceDetails.ts
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2023-11-03 21:25:40 +0800
committer简律纯 <i@jyunko.cn>2023-11-03 21:25:40 +0800
commit9029588590bea8b10451575c5142dcde77ecd1b5 (patch)
tree04cf8aee56c23fd225ff19d340f7cee621d874ef /packages/turbo-workspaces/src/getWorkspaceDetails.ts
parent94071d7ce16c56641d67d488e2bac6be84ffe731 (diff)
downloadHydroRoll-9029588590bea8b10451575c5142dcde77ecd1b5.tar.gz
HydroRoll-9029588590bea8b10451575c5142dcde77ecd1b5.zip
chore: delete useless files
Diffstat (limited to 'packages/turbo-workspaces/src/getWorkspaceDetails.ts')
-rw-r--r--packages/turbo-workspaces/src/getWorkspaceDetails.ts35
1 files changed, 0 insertions, 35 deletions
diff --git a/packages/turbo-workspaces/src/getWorkspaceDetails.ts b/packages/turbo-workspaces/src/getWorkspaceDetails.ts
deleted file mode 100644
index ad86a97..0000000
--- a/packages/turbo-workspaces/src/getWorkspaceDetails.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import { ConvertError } from "./errors";
-import managers from "./managers";
-import { Project } from "./types";
-import { directoryInfo } from "./utils";
-
-export default async function getWorkspaceDetails({
- root,
-}: {
- root: string;
-}): Promise<Project> {
- const { exists, absolute: workspaceRoot } = directoryInfo({
- directory: root,
- });
- if (!exists) {
- throw new ConvertError(
- `Could not find directory at ${workspaceRoot}. Ensure the directory exists.`,
- {
- type: "invalid_directory",
- }
- );
- }
-
- for (const { detect, read } of Object.values(managers)) {
- if (await detect({ workspaceRoot })) {
- return read({ workspaceRoot });
- }
- }
-
- throw new ConvertError(
- "Could not determine package manager. Add `packageManager` to `package.json` or ensure a lockfile is present.",
- {
- type: "package_manager-unable_to_detect",
- }
- );
-}