@yamada-ui/cli 2.0.0-dev-20250829123743 → 2.0.0-dev-20250829134305
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.js +16 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7159,6 +7159,17 @@ const tokens = new Command("tokens").description("generate theme typings").argum
|
|
|
7159
7159
|
}
|
|
7160
7160
|
});
|
|
7161
7161
|
|
|
7162
|
+
//#endregion
|
|
7163
|
+
//#region src/commands/update/validate-diff-3.ts
|
|
7164
|
+
async function validateDiff3() {
|
|
7165
|
+
try {
|
|
7166
|
+
await execa("diff3", ["--version"]);
|
|
7167
|
+
return true;
|
|
7168
|
+
} catch {
|
|
7169
|
+
throw new Error(`${c.yellow("diff3")} is not installed. Please install it.`);
|
|
7170
|
+
}
|
|
7171
|
+
}
|
|
7172
|
+
|
|
7162
7173
|
//#endregion
|
|
7163
7174
|
//#region src/commands/update/index.ts
|
|
7164
7175
|
const update = new Command("update").description("update components in your project").argument("[components...]", "components to update").option("--cwd <path>", "current working directory", cwd).option("-c, --config <path>", "path to the config file", CONFIG_FILE_NAME).option("-i, --install", "install dependencies", false).option("-s, --sequential", "run tasks sequentially.", false).option("-f, --format", "format the output files.").option("-l, --lint", "lint the output files.").action(async function(targetNames, { config: configPath, cwd: cwd$3, format: format$2, install, lint, sequential }) {
|
|
@@ -7172,6 +7183,9 @@ const update = new Command("update").description("update components in your proj
|
|
|
7172
7183
|
spinner.start("Validating directory");
|
|
7173
7184
|
await validateDir(cwd$3);
|
|
7174
7185
|
spinner.succeed("Validated directory");
|
|
7186
|
+
spinner.start("Validating methods");
|
|
7187
|
+
await validateDiff3();
|
|
7188
|
+
spinner.succeed("Validated methods");
|
|
7175
7189
|
spinner.start("Fetching config");
|
|
7176
7190
|
const config$1 = await getConfig(cwd$3, configPath, {
|
|
7177
7191
|
format: format$2,
|
|
@@ -7180,9 +7194,9 @@ const update = new Command("update").description("update components in your proj
|
|
|
7180
7194
|
spinner.succeed("Fetched config");
|
|
7181
7195
|
spinner.start("Getting generated components");
|
|
7182
7196
|
const all = !targetNames.length;
|
|
7183
|
-
const index = all || targetNames.includes("index");
|
|
7184
|
-
const theme$1 = all || targetNames.includes("theme");
|
|
7185
7197
|
const existsTheme = !!config$1.theme?.path && existsSync(config$1.theme.path);
|
|
7198
|
+
const index = all || targetNames.includes("index");
|
|
7199
|
+
const theme$1 = all ? existsTheme : targetNames.includes("theme");
|
|
7186
7200
|
if (theme$1 && !existsTheme) throw new Error([
|
|
7187
7201
|
`No ${c.yellow("theme")} found.`,
|
|
7188
7202
|
`Please run ${getCommand("theme")}`,
|