@yamada-ui/cli 2.1.14-dev-20261002045738 → 2.1.14-dev-20261005115337
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 +52 -38
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -958,8 +958,10 @@ var Interceptor = class {
|
|
|
958
958
|
if (this.exited) return;
|
|
959
959
|
this.exited = true;
|
|
960
960
|
for (const callback of this.callbacks) callback();
|
|
961
|
-
if (signal)
|
|
962
|
-
|
|
961
|
+
if (signal) {
|
|
962
|
+
if (IS_WINDOWS && signal !== "SIGINT" && signal !== "SIGTERM" && signal !== "SIGKILL") process$1.kill(process$1.pid, "SIGTERM");
|
|
963
|
+
else process$1.kill(process$1.pid, signal);
|
|
964
|
+
}
|
|
963
965
|
};
|
|
964
966
|
this.hook = () => {
|
|
965
967
|
process$1.once("exit", () => this.exit());
|
|
@@ -1054,8 +1056,10 @@ function writeFileSync(filePath, data, options = DEFAULT_WRITE_OPTIONS) {
|
|
|
1054
1056
|
if (options.tmpCreated) options.tmpCreated(tempPath);
|
|
1055
1057
|
if (isString$1(data)) FS.retry.writeSync(retryOptions)(fd, data, 0, options.encoding || "utf8");
|
|
1056
1058
|
else if (!isUndefined$1(data)) FS.retry.writeSync(retryOptions)(fd, data, 0, data.length, 0);
|
|
1057
|
-
if (options.fsync !== false)
|
|
1058
|
-
|
|
1059
|
+
if (options.fsync !== false) {
|
|
1060
|
+
if (options.fsyncWait !== false) FS.retry.fsyncSync(retryOptions)(fd);
|
|
1061
|
+
else FS.attempt.fsync(fd);
|
|
1062
|
+
}
|
|
1059
1063
|
FS.retry.closeSync(retryOptions)(fd);
|
|
1060
1064
|
fd = null;
|
|
1061
1065
|
if (options.chown && (options.chown.uid !== DEFAULT_USER_UID || options.chown.gid !== DEFAULT_USER_GID)) FS.attempt.chownSync(tempPath, options.chown.uid, options.chown.gid);
|
|
@@ -2098,9 +2102,11 @@ const deepMerge = (...sources) => {
|
|
|
2098
2102
|
}
|
|
2099
2103
|
}
|
|
2100
2104
|
if (searchParameters !== void 0) returnValue.searchParams = searchParameters;
|
|
2101
|
-
if (signals.length > 0)
|
|
2102
|
-
|
|
2103
|
-
|
|
2105
|
+
if (signals.length > 0) {
|
|
2106
|
+
if (signals.length === 1) returnValue.signal = signals[0];
|
|
2107
|
+
else if (supportsAbortSignal) returnValue.signal = AbortSignal.any(signals);
|
|
2108
|
+
else returnValue.signal = signals.at(-1);
|
|
2109
|
+
}
|
|
2104
2110
|
return returnValue;
|
|
2105
2111
|
};
|
|
2106
2112
|
//#endregion
|
|
@@ -2808,10 +2814,11 @@ var require_deep_extend = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2808
2814
|
function deepCloneArray(arr) {
|
|
2809
2815
|
var clone = [];
|
|
2810
2816
|
arr.forEach(function(item, index) {
|
|
2811
|
-
if (typeof item === "object" && item !== null)
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2817
|
+
if (typeof item === "object" && item !== null) {
|
|
2818
|
+
if (Array.isArray(item)) clone[index] = deepCloneArray(item);
|
|
2819
|
+
else if (isSpecificValue(item)) clone[index] = cloneSpecificValue(item);
|
|
2820
|
+
else clone[index] = deepExtend({}, item);
|
|
2821
|
+
} else clone[index] = item;
|
|
2815
2822
|
});
|
|
2816
2823
|
return clone;
|
|
2817
2824
|
}
|
|
@@ -2999,13 +3006,15 @@ var require_minimist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2999
3006
|
} else setArg(letters[j], flags.strings[letters[j]] ? "" : true, arg);
|
|
3000
3007
|
}
|
|
3001
3008
|
key = arg.slice(-1)[0];
|
|
3002
|
-
if (!broken && key !== "-")
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
+
if (!broken && key !== "-") {
|
|
3010
|
+
if (args[i + 1] && !/^(-|--)[^-]/.test(args[i + 1]) && !flags.bools[key] && (aliases[key] ? !aliasIsBoolean(key) : true)) {
|
|
3011
|
+
setArg(key, args[i + 1], arg);
|
|
3012
|
+
i += 1;
|
|
3013
|
+
} else if (args[i + 1] && /^(true|false)$/.test(args[i + 1])) {
|
|
3014
|
+
setArg(key, args[i + 1] === "true", arg);
|
|
3015
|
+
i += 1;
|
|
3016
|
+
} else setArg(key, flags.strings[key] ? "" : true, arg);
|
|
3017
|
+
}
|
|
3009
3018
|
} else {
|
|
3010
3019
|
if (!flags.unknownFn || flags.unknownFn(arg) !== false) argv._.push(flags.strings._ || !isNumber(arg) ? arg : Number(arg));
|
|
3011
3020
|
if (opts.stopEarly) {
|
|
@@ -3838,7 +3847,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3838
3847
|
__exportStar(require_ca_file(), exports);
|
|
3839
3848
|
}));
|
|
3840
3849
|
//#endregion
|
|
3841
|
-
//#region ../../node_modules/.pnpm/tsdown@0.
|
|
3850
|
+
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@typescript+native-preview@7.0.0-dev.20260707.2_oxc-resolver@11.24.2_tsx@4.23.15_typescript@6.0.3/node_modules/tsdown/esm-shims.js
|
|
3842
3851
|
var getFilename, getDirname, __dirname$2;
|
|
3843
3852
|
var init_esm_shims = __esmMin((() => {
|
|
3844
3853
|
getFilename = () => fileURLToPath(import.meta.url);
|
|
@@ -3965,13 +3974,14 @@ var require_config_chain = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3965
3974
|
} catch (er) {
|
|
3966
3975
|
return ini.parse(content);
|
|
3967
3976
|
}
|
|
3968
|
-
else if (type === "json")
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3977
|
+
else if (type === "json") {
|
|
3978
|
+
if (this.emit) try {
|
|
3979
|
+
return JSON.parse(content);
|
|
3980
|
+
} catch (er) {
|
|
3981
|
+
this.emit("error", er);
|
|
3982
|
+
}
|
|
3983
|
+
else return JSON.parse(content);
|
|
3984
|
+
} else return ini.parse(content);
|
|
3975
3985
|
};
|
|
3976
3986
|
var json = exports.json = function() {
|
|
3977
3987
|
var args = [].slice.call(arguments).filter(function(arg) {
|
|
@@ -4055,8 +4065,10 @@ var require_config_chain = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4055
4065
|
this._saving++;
|
|
4056
4066
|
fs$3.writeFile(target.path, data, "utf8", function(er) {
|
|
4057
4067
|
this._saving--;
|
|
4058
|
-
if (er)
|
|
4059
|
-
|
|
4068
|
+
if (er) {
|
|
4069
|
+
if (cb) return cb(er);
|
|
4070
|
+
else return this.emit("error", er);
|
|
4071
|
+
}
|
|
4060
4072
|
if (this._saving === 0) {
|
|
4061
4073
|
if (cb) cb();
|
|
4062
4074
|
this.emit("save");
|
|
@@ -6050,9 +6062,10 @@ function transformContent(targetSection, content, { getSection }, generatedNames
|
|
|
6050
6062
|
} else {
|
|
6051
6063
|
const depth = (value.match(/\.\.\//g) || []).length;
|
|
6052
6064
|
if (!depth) return;
|
|
6053
|
-
if (depth === 1)
|
|
6054
|
-
|
|
6055
|
-
|
|
6065
|
+
if (depth === 1) {
|
|
6066
|
+
if (generated) replaceValue = `from "${path.posix.join("..", name)}"`;
|
|
6067
|
+
else replaceValue = `from "${PACKAGE_NAME}/${targetSection}/${name}"`;
|
|
6068
|
+
} else {
|
|
6056
6069
|
const { path: sectionPath, section } = getSection(value.replace(/(\.\.\/|\.\/)/g, "").split("/").slice(0, -1).join("/")) ?? {};
|
|
6057
6070
|
if (!section || !sectionPath) return;
|
|
6058
6071
|
if (generated) {
|
|
@@ -6741,13 +6754,14 @@ const diff = new Command("diff").description("check for updates against the regi
|
|
|
6741
6754
|
`Please run ${getCommand("theme")}`,
|
|
6742
6755
|
"to generate it."
|
|
6743
6756
|
].join(" "));
|
|
6744
|
-
if (!index && !theme) if (targetName)
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6757
|
+
if (!index && !theme) if (targetName) {
|
|
6758
|
+
if (generatedNames.includes(targetName)) componentNames.push(targetName);
|
|
6759
|
+
else throw new Error([
|
|
6760
|
+
`No ${c.yellow(targetName)} found in generated components.`,
|
|
6761
|
+
`Please run ${getCommand("add")} ${c.green(targetName)}`,
|
|
6762
|
+
"to add it."
|
|
6763
|
+
].join(" "));
|
|
6764
|
+
} else {
|
|
6751
6765
|
componentNames.push(...generatedNames);
|
|
6752
6766
|
index = true;
|
|
6753
6767
|
if (existsTheme) theme = true;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamada-ui/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.1.14-dev-
|
|
4
|
+
"version": "2.1.14-dev-20261005115337",
|
|
5
5
|
"description": "The official CLI for Yamada UI projects",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"theme",
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
"node-fetch": "^3.3.2",
|
|
46
46
|
"ora": "^9.4.0",
|
|
47
47
|
"picocolors": "^1.1.1",
|
|
48
|
-
"prettier": "^3.9.
|
|
48
|
+
"prettier": "^3.9.9",
|
|
49
49
|
"prompts": "^2.4.2",
|
|
50
50
|
"rimraf": "^6.1.3",
|
|
51
51
|
"semver": "^7.8.5",
|
|
52
52
|
"sucrase": "^3.35.1",
|
|
53
53
|
"validate-npm-package-name": "^7.0.2",
|
|
54
54
|
"yamljs": "^0.3.0",
|
|
55
|
-
"@yamada-ui/utils": "2.1.7-dev-
|
|
55
|
+
"@yamada-ui/utils": "2.1.7-dev-20261005115337"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/prompts": "^2.4.9",
|