@yamada-ui/cli 2.1.0 → 2.1.1-dev-20260310110343
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/index.mjs +11 -18
- package/package.json +1 -2
package/dist/index.mjs
CHANGED
|
@@ -10,6 +10,7 @@ import path from "node:path";
|
|
|
10
10
|
import { format, promisify } from "node:util";
|
|
11
11
|
import os from "node:os";
|
|
12
12
|
import fs, { existsSync, realpathSync, statSync } from "fs";
|
|
13
|
+
import { promisify as promisify$1 } from "util";
|
|
13
14
|
import os$1, { tmpdir } from "os";
|
|
14
15
|
import path$1 from "path";
|
|
15
16
|
import fs$1 from "node:fs";
|
|
@@ -23,9 +24,9 @@ import { mkdir, mkdtemp, readFile, readdir, writeFile } from "fs/promises";
|
|
|
23
24
|
import { Listr } from "listr2";
|
|
24
25
|
import ora from "ora";
|
|
25
26
|
import prompts from "prompts";
|
|
26
|
-
import { ExecaError, execa } from "execa";
|
|
27
27
|
import "validate-npm-package-name";
|
|
28
28
|
import YAML from "yamljs";
|
|
29
|
+
import { execFile } from "child_process";
|
|
29
30
|
import { glob } from "glob";
|
|
30
31
|
import { ESLint } from "eslint";
|
|
31
32
|
import { format as format$1, resolveConfig, resolveConfigFile } from "prettier";
|
|
@@ -5544,7 +5545,6 @@ var package_default = {
|
|
|
5544
5545
|
"diff": "^8.0.3",
|
|
5545
5546
|
"esbuild": "^0.27.3",
|
|
5546
5547
|
"eslint": "^9.39.3",
|
|
5547
|
-
"execa": "9.6.1",
|
|
5548
5548
|
"glob": "^13.0.6",
|
|
5549
5549
|
"https-proxy-agent": "^7.0.6",
|
|
5550
5550
|
"listr2": "^10.2.1",
|
|
@@ -5732,6 +5732,7 @@ async function formatFiles(patterns, { enabled = true, ...options } = {}) {
|
|
|
5732
5732
|
//#endregion
|
|
5733
5733
|
//#region src/utils/fs.ts
|
|
5734
5734
|
const cwd = process.env.INIT_CWD ?? process.cwd();
|
|
5735
|
+
const execFileAsync$1 = promisify$1(execFile);
|
|
5735
5736
|
async function isWriteable(directory) {
|
|
5736
5737
|
try {
|
|
5737
5738
|
await fs.promises.access(directory, ("constants" in fs ? fs.constants : fs).W_OK);
|
|
@@ -5884,24 +5885,15 @@ function packageExecuteCommands(packageManager) {
|
|
|
5884
5885
|
}
|
|
5885
5886
|
async function installDependencies(dependencies$1, { cwd: cwd$1, dev, exact = true } = {}) {
|
|
5886
5887
|
const packageManager = getPackageManager();
|
|
5887
|
-
if (dependencies$1?.length) await
|
|
5888
|
+
if (dependencies$1?.length) await execFileAsync$1(packageManager, [...packageAddArgs(packageManager, {
|
|
5888
5889
|
dev,
|
|
5889
5890
|
exact
|
|
5890
|
-
}), ...dependencies$1], {
|
|
5891
|
-
|
|
5892
|
-
stdout: "ignore"
|
|
5893
|
-
});
|
|
5894
|
-
else await execa(packageManager, ["install"], {
|
|
5895
|
-
cwd: cwd$1,
|
|
5896
|
-
stdout: "ignore"
|
|
5897
|
-
});
|
|
5891
|
+
}), ...dependencies$1], { cwd: cwd$1 });
|
|
5892
|
+
else await execFileAsync$1(packageManager, ["install"], { cwd: cwd$1 });
|
|
5898
5893
|
}
|
|
5899
5894
|
async function uninstallDependencies(dependencies$1, { cwd: cwd$1 } = {}) {
|
|
5900
5895
|
const packageManager = getPackageManager();
|
|
5901
|
-
if (dependencies$1.length) await
|
|
5902
|
-
cwd: cwd$1,
|
|
5903
|
-
stdout: "ignore"
|
|
5904
|
-
});
|
|
5896
|
+
if (dependencies$1.length) await execFileAsync$1(packageManager, [packageManager === "npm" ? "uninstall" : "remove", ...dependencies$1], { cwd: cwd$1 });
|
|
5905
5897
|
}
|
|
5906
5898
|
async function addWorkspace(cwd$1, workspacePath, config$1) {
|
|
5907
5899
|
switch (getPackageManager()) {
|
|
@@ -6634,7 +6626,7 @@ async function mergeContent(remotePath, localPath, currentPath, fallback) {
|
|
|
6634
6626
|
let content = "";
|
|
6635
6627
|
let conflict = false;
|
|
6636
6628
|
try {
|
|
6637
|
-
const { stdout } = await
|
|
6629
|
+
const { stdout } = await execFileAsync$1("diff3", [
|
|
6638
6630
|
"-m",
|
|
6639
6631
|
remotePath,
|
|
6640
6632
|
localPath,
|
|
@@ -6642,7 +6634,7 @@ async function mergeContent(remotePath, localPath, currentPath, fallback) {
|
|
|
6642
6634
|
]);
|
|
6643
6635
|
content = stdout;
|
|
6644
6636
|
} catch (e) {
|
|
6645
|
-
if (e
|
|
6637
|
+
if (e?.stdout) {
|
|
6646
6638
|
conflict = true;
|
|
6647
6639
|
content = e.stdout;
|
|
6648
6640
|
} else content = fallback;
|
|
@@ -6729,9 +6721,10 @@ async function updateFiles(changeMap, { add: add$1, remove, update: update$1 },
|
|
|
6729
6721
|
|
|
6730
6722
|
//#endregion
|
|
6731
6723
|
//#region src/commands/update/validate-diff-3.ts
|
|
6724
|
+
const execFileAsync = promisify$1(execFile);
|
|
6732
6725
|
async function validateDiff3() {
|
|
6733
6726
|
try {
|
|
6734
|
-
await
|
|
6727
|
+
await execFileAsync("diff3", ["--version"]);
|
|
6735
6728
|
return true;
|
|
6736
6729
|
} catch {
|
|
6737
6730
|
throw new Error(`${c.yellow("diff3")} is not installed. Please install it.`);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamada-ui/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.1-dev-20260310110343",
|
|
5
5
|
"description": "The official CLI for Yamada UI projects",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"theme",
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
"diff": "^8.0.3",
|
|
40
40
|
"esbuild": "^0.27.3",
|
|
41
41
|
"eslint": "^9.39.3",
|
|
42
|
-
"execa": "9.6.1",
|
|
43
42
|
"glob": "^13.0.6",
|
|
44
43
|
"https-proxy-agent": "^7.0.6",
|
|
45
44
|
"listr2": "^10.2.1",
|