@theholocron/cli 5.0.0-alpha.165 → 5.0.0-alpha.166

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.
package/dist/cli.mjs CHANGED
@@ -23,7 +23,7 @@ import chalk from "chalk";
23
23
  import search from "@inquirer/search";
24
24
  import { execFileSync, spawn, spawnSync } from "node:child_process";
25
25
  import ora from "ora";
26
- import { findRootSync, walkFilesSync } from "@theholocron/fs-utils";
26
+ import { findRootSync, isWorkspaceRoot, walkFilesSync } from "@theholocron/fs-utils";
27
27
  import { access, copyFile, mkdir, readFile, readdir, rename, rm, stat, symlink, unlink, writeFile } from "node:fs/promises";
28
28
  import { stringifyJson } from "@theholocron/json-utils";
29
29
  import { createHash, randomUUID } from "node:crypto";
@@ -6276,7 +6276,7 @@ async function runSetup(input) {
6276
6276
  }
6277
6277
  const properties = {};
6278
6278
  if (effectivePreset && effectivePreset !== "none") properties["holocron_branch_protection_level"] = effectivePreset;
6279
- const isMonorepo = await access(join(input.context.repoRoot, "pnpm-workspace.yaml")).then(() => true).catch(() => false);
6279
+ const isMonorepo = await isWorkspaceRoot(input.context.repoRoot);
6280
6280
  properties["monorepo"] = String(isMonorepo);
6281
6281
  const manual = repo?.properties ?? {};
6282
6282
  if (manual.lifecycle) properties["lifecycle"] = manual.lifecycle;
@@ -7262,7 +7262,7 @@ async function runSync(input) {
7262
7262
  const properties = {};
7263
7263
  const effectivePreset = repo?.protection;
7264
7264
  if (effectivePreset && effectivePreset !== "none") properties["holocron_branch_protection_level"] = effectivePreset;
7265
- const isMonorepo = await access(join(gitRoot, "pnpm-workspace.yaml")).then(() => true).catch(() => false);
7265
+ const isMonorepo = await isWorkspaceRoot(gitRoot);
7266
7266
  properties["monorepo"] = String(isMonorepo);
7267
7267
  const manual = repo?.properties ?? {};
7268
7268
  if (manual.lifecycle) properties["lifecycle"] = manual.lifecycle;