@theholocron/cli 5.0.0-alpha.147 → 5.0.0-alpha.148
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 +7 -11
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +3 -7
- package/dist/index.mjs +8 -12
- package/package.json +10 -9
package/dist/cli.mjs
CHANGED
|
@@ -20,6 +20,7 @@ import ora from "ora";
|
|
|
20
20
|
import { execFileSync, spawn, spawnSync } from "node:child_process";
|
|
21
21
|
import { stringifyJson } from "@theholocron/json-utils";
|
|
22
22
|
import { readGitRemote, updateGitignore } from "@theholocron/git-utils";
|
|
23
|
+
import { readPackageJson } from "@theholocron/pkg-utils";
|
|
23
24
|
import { access, copyFile, mkdir, readFile, readdir, rename, rm, stat, symlink, unlink, writeFile } from "node:fs/promises";
|
|
24
25
|
import { createHash, randomUUID } from "node:crypto";
|
|
25
26
|
import { findRootSync } from "@theholocron/fs-utils";
|
|
@@ -4554,10 +4555,10 @@ function deriveCompliance(capabilities) {
|
|
|
4554
4555
|
*/
|
|
4555
4556
|
async function readWorkspacePackageJsons(repoRoot, workspacePackages) {
|
|
4556
4557
|
const results = [];
|
|
4557
|
-
for (const { slug, dir = "packages" } of workspacePackages)
|
|
4558
|
-
const
|
|
4559
|
-
results.push(
|
|
4560
|
-
}
|
|
4558
|
+
for (const { slug, dir = "packages" } of workspacePackages) {
|
|
4559
|
+
const pkg = await readPackageJson(join(repoRoot, dir, slug));
|
|
4560
|
+
if (pkg) results.push(pkg);
|
|
4561
|
+
}
|
|
4561
4562
|
return results;
|
|
4562
4563
|
}
|
|
4563
4564
|
//#endregion
|
|
@@ -8357,13 +8358,8 @@ async function deriveDefaults(configDir, raw) {
|
|
|
8357
8358
|
return result;
|
|
8358
8359
|
}
|
|
8359
8360
|
async function readPackageJsonName(dir) {
|
|
8360
|
-
|
|
8361
|
-
|
|
8362
|
-
const pkg = JSON.parse(content);
|
|
8363
|
-
return typeof pkg.name === "string" ? pkg.name.replace(/^@[^/]+\//, "") : void 0;
|
|
8364
|
-
} catch {
|
|
8365
|
-
return;
|
|
8366
|
-
}
|
|
8361
|
+
const name = (await readPackageJson(dir))?.name;
|
|
8362
|
+
return name === void 0 ? void 0 : name.replace(/^@[^/]+\//, "");
|
|
8367
8363
|
}
|
|
8368
8364
|
//#endregion
|
|
8369
8365
|
//#region src/interactive-menu.ts
|