@yamada-ui/cli 1.1.1-dev-20240825094045 → 1.1.1-dev-20240825095648
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/command/index.js +7 -7
- package/dist/command/theme/index.js +5 -5
- package/dist/command/tokens/create-theme-typings.js +2 -2
- package/dist/command/tokens/index.js +4 -4
- package/dist/index.js +140 -143
- package/dist/utils/cli.js +833 -846
- package/dist/utils/index.js +833 -846
- package/package.json +5 -3
package/dist/command/index.js
CHANGED
|
@@ -30,9 +30,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
));
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
-
// ../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.
|
|
33
|
+
// ../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.10_@swc+helpers@0.5.5__jiti@1.21.6_postcss@8.4.41_tsx@4.17.0_typescript@5.5.4_yaml@2.5.0/node_modules/tsup/assets/cjs_shims.js
|
|
34
34
|
var init_cjs_shims = __esm({
|
|
35
|
-
"../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.
|
|
35
|
+
"../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.10_@swc+helpers@0.5.5__jiti@1.21.6_postcss@8.4.41_tsx@4.17.0_typescript@5.5.4_yaml@2.5.0/node_modules/tsup/assets/cjs_shims.js"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
}
|
|
38
38
|
});
|
|
@@ -826,8 +826,8 @@ var generateThemeTypings = async ({
|
|
|
826
826
|
p.note(outPath, "Output path");
|
|
827
827
|
const end = process.hrtime.bigint();
|
|
828
828
|
const duration = (Number(end - start) / 1e9).toFixed(2);
|
|
829
|
-
p.outro(
|
|
830
|
-
`);
|
|
829
|
+
p.outro(source_default.green(`Done in ${duration}s
|
|
830
|
+
`));
|
|
831
831
|
} catch (e) {
|
|
832
832
|
s.stop(`An error occurred`, 500);
|
|
833
833
|
p.cancel(source_default.red(e instanceof Error ? e.message : "Message is missing"));
|
|
@@ -1031,7 +1031,7 @@ var replaceIndex = (content) => {
|
|
|
1031
1031
|
var generateTheme = async (outPath, fileMap, isReactReplace, isForceReplace) => {
|
|
1032
1032
|
if (!await isWriteable(import_path4.default.dirname(outPath))) {
|
|
1033
1033
|
throw new Error(
|
|
1034
|
-
"The provided path is not writable, please check folder permissions and try again
|
|
1034
|
+
"The provided path is not writable, please check folder permissions and try again.\nIt is likely you do not have write permissions for this folder."
|
|
1035
1035
|
);
|
|
1036
1036
|
}
|
|
1037
1037
|
await (0, import_promises2.mkdir)(outPath, { recursive: true });
|
|
@@ -1077,8 +1077,8 @@ var actionTheme = async (_outPath, { branch = DEFAULT_BRANCH_NAME, cwd, replace
|
|
|
1077
1077
|
s.stop(`Wrote the theme`);
|
|
1078
1078
|
const end = process.hrtime.bigint();
|
|
1079
1079
|
const duration = (Number(end - start) / 1e9).toFixed(2);
|
|
1080
|
-
p2.outro(
|
|
1081
|
-
`);
|
|
1080
|
+
p2.outro(source_default.green(`Done in ${duration}s
|
|
1081
|
+
`));
|
|
1082
1082
|
} catch (e) {
|
|
1083
1083
|
s.stop(`An error occurred`, 500);
|
|
1084
1084
|
p2.cancel(source_default.red(e instanceof Error ? e.message : "Message is missing"));
|
|
@@ -30,9 +30,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
));
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
-
// ../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.
|
|
33
|
+
// ../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.10_@swc+helpers@0.5.5__jiti@1.21.6_postcss@8.4.41_tsx@4.17.0_typescript@5.5.4_yaml@2.5.0/node_modules/tsup/assets/cjs_shims.js
|
|
34
34
|
var init_cjs_shims = __esm({
|
|
35
|
-
"../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.
|
|
35
|
+
"../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.10_@swc+helpers@0.5.5__jiti@1.21.6_postcss@8.4.41_tsx@4.17.0_typescript@5.5.4_yaml@2.5.0/node_modules/tsup/assets/cjs_shims.js"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
}
|
|
38
38
|
});
|
|
@@ -733,7 +733,7 @@ var replaceIndex = (content) => {
|
|
|
733
733
|
var generateTheme = async (outPath, fileMap, isReactReplace, isForceReplace) => {
|
|
734
734
|
if (!await isWriteable(import_path2.default.dirname(outPath))) {
|
|
735
735
|
throw new Error(
|
|
736
|
-
"The provided path is not writable, please check folder permissions and try again
|
|
736
|
+
"The provided path is not writable, please check folder permissions and try again.\nIt is likely you do not have write permissions for this folder."
|
|
737
737
|
);
|
|
738
738
|
}
|
|
739
739
|
await (0, import_promises.mkdir)(outPath, { recursive: true });
|
|
@@ -779,8 +779,8 @@ var actionTheme = async (_outPath, { branch = DEFAULT_BRANCH_NAME, cwd, replace
|
|
|
779
779
|
s.stop(`Wrote the theme`);
|
|
780
780
|
const end = process.hrtime.bigint();
|
|
781
781
|
const duration = (Number(end - start) / 1e9).toFixed(2);
|
|
782
|
-
p.outro(
|
|
783
|
-
`);
|
|
782
|
+
p.outro(source_default.green(`Done in ${duration}s
|
|
783
|
+
`));
|
|
784
784
|
} catch (e) {
|
|
785
785
|
s.stop(`An error occurred`, 500);
|
|
786
786
|
p.cancel(source_default.red(e instanceof Error ? e.message : "Message is missing"));
|
|
@@ -30,9 +30,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
));
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
-
// ../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.
|
|
33
|
+
// ../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.10_@swc+helpers@0.5.5__jiti@1.21.6_postcss@8.4.41_tsx@4.17.0_typescript@5.5.4_yaml@2.5.0/node_modules/tsup/assets/cjs_shims.js
|
|
34
34
|
var init_cjs_shims = __esm({
|
|
35
|
-
"../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.
|
|
35
|
+
"../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.10_@swc+helpers@0.5.5__jiti@1.21.6_postcss@8.4.41_tsx@4.17.0_typescript@5.5.4_yaml@2.5.0/node_modules/tsup/assets/cjs_shims.js"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
}
|
|
38
38
|
});
|
|
@@ -30,9 +30,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
));
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
-
// ../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.
|
|
33
|
+
// ../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.10_@swc+helpers@0.5.5__jiti@1.21.6_postcss@8.4.41_tsx@4.17.0_typescript@5.5.4_yaml@2.5.0/node_modules/tsup/assets/cjs_shims.js
|
|
34
34
|
var init_cjs_shims = __esm({
|
|
35
|
-
"../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.
|
|
35
|
+
"../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.10_@swc+helpers@0.5.5__jiti@1.21.6_postcss@8.4.41_tsx@4.17.0_typescript@5.5.4_yaml@2.5.0/node_modules/tsup/assets/cjs_shims.js"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
}
|
|
38
38
|
});
|
|
@@ -822,8 +822,8 @@ var generateThemeTypings = async ({
|
|
|
822
822
|
p.note(outPath, "Output path");
|
|
823
823
|
const end = process.hrtime.bigint();
|
|
824
824
|
const duration = (Number(end - start) / 1e9).toFixed(2);
|
|
825
|
-
p.outro(
|
|
826
|
-
`);
|
|
825
|
+
p.outro(source_default.green(`Done in ${duration}s
|
|
826
|
+
`));
|
|
827
827
|
} catch (e) {
|
|
828
828
|
s.stop(`An error occurred`, 500);
|
|
829
829
|
p.cancel(source_default.red(e instanceof Error ? e.message : "Message is missing"));
|
package/dist/index.js
CHANGED
|
@@ -33,10 +33,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
));
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
-
// ../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.
|
|
36
|
+
// ../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.10_@swc+helpers@0.5.5__jiti@1.21.6_postcss@8.4.41_tsx@4.17.0_typescript@5.5.4_yaml@2.5.0/node_modules/tsup/assets/cjs_shims.js
|
|
37
37
|
var getImportMetaUrl, importMetaUrl;
|
|
38
38
|
var init_cjs_shims = __esm({
|
|
39
|
-
"../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.
|
|
39
|
+
"../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.10_@swc+helpers@0.5.5__jiti@1.21.6_postcss@8.4.41_tsx@4.17.0_typescript@5.5.4_yaml@2.5.0/node_modules/tsup/assets/cjs_shims.js"() {
|
|
40
40
|
"use strict";
|
|
41
41
|
getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
42
42
|
importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
@@ -1167,8 +1167,6 @@ var require_semver = __commonJS({
|
|
|
1167
1167
|
this.inc("patch", identifier, identifierBase);
|
|
1168
1168
|
this.inc("pre", identifier, identifierBase);
|
|
1169
1169
|
break;
|
|
1170
|
-
// If the input is a non-prerelease version, this acts the same as
|
|
1171
|
-
// prepatch.
|
|
1172
1170
|
case "prerelease":
|
|
1173
1171
|
if (this.prerelease.length === 0) {
|
|
1174
1172
|
this.inc("patch", identifier, identifierBase);
|
|
@@ -1196,8 +1194,6 @@ var require_semver = __commonJS({
|
|
|
1196
1194
|
}
|
|
1197
1195
|
this.prerelease = [];
|
|
1198
1196
|
break;
|
|
1199
|
-
// This probably shouldn't be used publicly.
|
|
1200
|
-
// 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
|
|
1201
1197
|
case "pre": {
|
|
1202
1198
|
const base = Number(identifierBase) ? 1 : 0;
|
|
1203
1199
|
if (!identifier && identifierBase === false) {
|
|
@@ -2303,7 +2299,6 @@ var require_min_version = __commonJS({
|
|
|
2303
2299
|
compver.prerelease.push(0);
|
|
2304
2300
|
}
|
|
2305
2301
|
compver.raw = compver.format();
|
|
2306
|
-
/* fallthrough */
|
|
2307
2302
|
case "":
|
|
2308
2303
|
case ">=":
|
|
2309
2304
|
if (!setMin || gt(compver, setMin)) {
|
|
@@ -2313,7 +2308,6 @@ var require_min_version = __commonJS({
|
|
|
2313
2308
|
case "<":
|
|
2314
2309
|
case "<=":
|
|
2315
2310
|
break;
|
|
2316
|
-
/* istanbul ignore next */
|
|
2317
2311
|
default:
|
|
2318
2312
|
throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
2319
2313
|
}
|
|
@@ -3384,7 +3378,7 @@ var require_rc = __commonJS({
|
|
|
3384
3378
|
"use strict";
|
|
3385
3379
|
init_cjs_shims();
|
|
3386
3380
|
var cc = require_utils();
|
|
3387
|
-
var
|
|
3381
|
+
var join2 = require("path").join;
|
|
3388
3382
|
var deepExtend = require_deep_extend();
|
|
3389
3383
|
var etc = "/etc";
|
|
3390
3384
|
var win = process.platform === "win32";
|
|
@@ -3409,15 +3403,15 @@ var require_rc = __commonJS({
|
|
|
3409
3403
|
}
|
|
3410
3404
|
if (!win)
|
|
3411
3405
|
[
|
|
3412
|
-
|
|
3413
|
-
|
|
3406
|
+
join2(etc, name, "config"),
|
|
3407
|
+
join2(etc, name + "rc")
|
|
3414
3408
|
].forEach(addConfigFile);
|
|
3415
3409
|
if (home)
|
|
3416
3410
|
[
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3411
|
+
join2(home, ".config", name, "config"),
|
|
3412
|
+
join2(home, ".config", name),
|
|
3413
|
+
join2(home, "." + name, "config"),
|
|
3414
|
+
join2(home, "." + name + "rc")
|
|
3421
3415
|
].forEach(addConfigFile);
|
|
3422
3416
|
addConfigFile(cc.find("." + name + "rc"));
|
|
3423
3417
|
if (env4.config) addConfigFile(env4.config);
|
|
@@ -4721,7 +4715,6 @@ var require_util = __commonJS({
|
|
|
4721
4715
|
return true;
|
|
4722
4716
|
}
|
|
4723
4717
|
switch (field) {
|
|
4724
|
-
// eslint-disable-line default-case
|
|
4725
4718
|
case "true": {
|
|
4726
4719
|
return true;
|
|
4727
4720
|
}
|
|
@@ -5919,7 +5912,18 @@ __export(src_exports, {
|
|
|
5919
5912
|
});
|
|
5920
5913
|
module.exports = __toCommonJS(src_exports);
|
|
5921
5914
|
init_cjs_shims();
|
|
5922
|
-
var
|
|
5915
|
+
var path13 = __toESM(require("path"));
|
|
5916
|
+
var import_commander = require("commander");
|
|
5917
|
+
|
|
5918
|
+
// src/command/index.ts
|
|
5919
|
+
init_cjs_shims();
|
|
5920
|
+
|
|
5921
|
+
// src/command/tokens/index.ts
|
|
5922
|
+
init_cjs_shims();
|
|
5923
|
+
var import_promises = require("fs/promises");
|
|
5924
|
+
var import_path4 = __toESM(require("path"));
|
|
5925
|
+
var p = __toESM(require("@clack/prompts"));
|
|
5926
|
+
var import_bundle_n_require = require("bundle-n-require");
|
|
5923
5927
|
|
|
5924
5928
|
// ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
|
|
5925
5929
|
init_cjs_shims();
|
|
@@ -6416,81 +6420,7 @@ var chalk = createChalk();
|
|
|
6416
6420
|
var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
6417
6421
|
var source_default = chalk;
|
|
6418
6422
|
|
|
6419
|
-
// src/index.ts
|
|
6420
|
-
var import_commander = require("commander");
|
|
6421
|
-
|
|
6422
|
-
// package.json
|
|
6423
|
-
var package_default = {
|
|
6424
|
-
name: "@yamada-ui/cli",
|
|
6425
|
-
version: "1.1.0",
|
|
6426
|
-
description: "Generate theme tokens for autocomplete",
|
|
6427
|
-
keywords: [
|
|
6428
|
-
"theme",
|
|
6429
|
-
"theming",
|
|
6430
|
-
"typings",
|
|
6431
|
-
"generator",
|
|
6432
|
-
"yamada ui",
|
|
6433
|
-
"yamada",
|
|
6434
|
-
"ui mode",
|
|
6435
|
-
"ui"
|
|
6436
|
-
],
|
|
6437
|
-
author: "Hirotomo Yamada <hirotomo.yamada@avap.co.jp>",
|
|
6438
|
-
license: "MIT",
|
|
6439
|
-
main: "dist/index.js",
|
|
6440
|
-
files: [
|
|
6441
|
-
"dist",
|
|
6442
|
-
"bin"
|
|
6443
|
-
],
|
|
6444
|
-
sideEffects: false,
|
|
6445
|
-
publishConfig: {
|
|
6446
|
-
access: "public"
|
|
6447
|
-
},
|
|
6448
|
-
homepage: "https://yamada-ui.com",
|
|
6449
|
-
repository: {
|
|
6450
|
-
type: "git",
|
|
6451
|
-
url: "https://github.com/yamada-ui/yamada-ui",
|
|
6452
|
-
directory: "packages/cli"
|
|
6453
|
-
},
|
|
6454
|
-
bugs: {
|
|
6455
|
-
url: "https://github.com/yamada-ui/yamada-ui/issues"
|
|
6456
|
-
},
|
|
6457
|
-
bin: {
|
|
6458
|
-
"yamada-cli": "bin/index.js"
|
|
6459
|
-
},
|
|
6460
|
-
scripts: {
|
|
6461
|
-
clean: "rimraf dist .turbo",
|
|
6462
|
-
build: "tsup src --format cjs --clean --shims",
|
|
6463
|
-
dev: "pnpm build --watch",
|
|
6464
|
-
typecheck: " tsc --noEmit"
|
|
6465
|
-
},
|
|
6466
|
-
dependencies: {
|
|
6467
|
-
"@clack/prompts": "^0.7.0",
|
|
6468
|
-
"bundle-n-require": "^1.1.1",
|
|
6469
|
-
chokidar: "^3.6.0",
|
|
6470
|
-
"cli-check-node": "^1.3.4",
|
|
6471
|
-
"cli-handle-unhandled": "^1.1.1",
|
|
6472
|
-
commander: "^12.1.0",
|
|
6473
|
-
glob: "^11.0.0",
|
|
6474
|
-
prettier: "^3.3.3",
|
|
6475
|
-
tar: "^7.4.3",
|
|
6476
|
-
typescript: "^5.5.4"
|
|
6477
|
-
},
|
|
6478
|
-
devDependencies: {
|
|
6479
|
-
"update-notifier": "^7.2.0",
|
|
6480
|
-
chalk: "^5.3.0",
|
|
6481
|
-
"@types/update-notifier": "6.0.8"
|
|
6482
|
-
}
|
|
6483
|
-
};
|
|
6484
|
-
|
|
6485
|
-
// src/command/index.ts
|
|
6486
|
-
init_cjs_shims();
|
|
6487
|
-
|
|
6488
6423
|
// src/command/tokens/index.ts
|
|
6489
|
-
init_cjs_shims();
|
|
6490
|
-
var import_promises = require("fs/promises");
|
|
6491
|
-
var import_path4 = __toESM(require("path"));
|
|
6492
|
-
var p = __toESM(require("@clack/prompts"));
|
|
6493
|
-
var import_bundle_n_require = require("bundle-n-require");
|
|
6494
6424
|
var import_chokidar = __toESM(require("chokidar"));
|
|
6495
6425
|
|
|
6496
6426
|
// src/command/tokens/create-theme-typings.ts
|
|
@@ -6506,6 +6436,7 @@ var isArray = (value) => Array.isArray(value);
|
|
|
6506
6436
|
init_cjs_shims();
|
|
6507
6437
|
var import_cli_check_node = __toESM(require("cli-check-node"));
|
|
6508
6438
|
var import_cli_handle_unhandled = __toESM(require("cli-handle-unhandled"));
|
|
6439
|
+
var import_cli_welcome = __toESM(require("cli-welcome"));
|
|
6509
6440
|
|
|
6510
6441
|
// ../../node_modules/.pnpm/update-notifier@7.2.0/node_modules/update-notifier/index.js
|
|
6511
6442
|
init_cjs_shims();
|
|
@@ -7311,13 +7242,13 @@ init_cjs_shims();
|
|
|
7311
7242
|
// ../../node_modules/.pnpm/package-json@10.0.1/node_modules/package-json/index.js
|
|
7312
7243
|
init_cjs_shims();
|
|
7313
7244
|
|
|
7314
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7245
|
+
// ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/index.js
|
|
7315
7246
|
init_cjs_shims();
|
|
7316
7247
|
|
|
7317
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7248
|
+
// ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/core/Ky.js
|
|
7318
7249
|
init_cjs_shims();
|
|
7319
7250
|
|
|
7320
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7251
|
+
// ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/errors/HTTPError.js
|
|
7321
7252
|
init_cjs_shims();
|
|
7322
7253
|
var HTTPError = class extends Error {
|
|
7323
7254
|
response;
|
|
@@ -7336,7 +7267,7 @@ var HTTPError = class extends Error {
|
|
|
7336
7267
|
}
|
|
7337
7268
|
};
|
|
7338
7269
|
|
|
7339
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7270
|
+
// ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/errors/TimeoutError.js
|
|
7340
7271
|
init_cjs_shims();
|
|
7341
7272
|
var TimeoutError = class extends Error {
|
|
7342
7273
|
request;
|
|
@@ -7347,14 +7278,14 @@ var TimeoutError = class extends Error {
|
|
|
7347
7278
|
}
|
|
7348
7279
|
};
|
|
7349
7280
|
|
|
7350
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7281
|
+
// ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/utils/merge.js
|
|
7351
7282
|
init_cjs_shims();
|
|
7352
7283
|
|
|
7353
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7284
|
+
// ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/utils/is.js
|
|
7354
7285
|
init_cjs_shims();
|
|
7355
7286
|
var isObject3 = (value) => value !== null && typeof value === "object";
|
|
7356
7287
|
|
|
7357
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7288
|
+
// ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/utils/merge.js
|
|
7358
7289
|
var validateAndMerge = (...sources) => {
|
|
7359
7290
|
for (const source of sources) {
|
|
7360
7291
|
if ((!isObject3(source) || Array.isArray(source)) && source !== void 0) {
|
|
@@ -7376,19 +7307,9 @@ var mergeHeaders = (source1 = {}, source2 = {}) => {
|
|
|
7376
7307
|
}
|
|
7377
7308
|
return result;
|
|
7378
7309
|
};
|
|
7379
|
-
function newHookValue(original, incoming, property) {
|
|
7380
|
-
return Object.hasOwn(incoming, property) && incoming[property] === void 0 ? [] : deepMerge(original[property] ?? [], incoming[property] ?? []);
|
|
7381
|
-
}
|
|
7382
|
-
var mergeHooks = (original = {}, incoming = {}) => ({
|
|
7383
|
-
beforeRequest: newHookValue(original, incoming, "beforeRequest"),
|
|
7384
|
-
beforeRetry: newHookValue(original, incoming, "beforeRetry"),
|
|
7385
|
-
afterResponse: newHookValue(original, incoming, "afterResponse"),
|
|
7386
|
-
beforeError: newHookValue(original, incoming, "beforeError")
|
|
7387
|
-
});
|
|
7388
7310
|
var deepMerge = (...sources) => {
|
|
7389
7311
|
let returnValue = {};
|
|
7390
7312
|
let headers = {};
|
|
7391
|
-
let hooks = {};
|
|
7392
7313
|
for (const source of sources) {
|
|
7393
7314
|
if (Array.isArray(source)) {
|
|
7394
7315
|
if (!Array.isArray(returnValue)) {
|
|
@@ -7402,10 +7323,6 @@ var deepMerge = (...sources) => {
|
|
|
7402
7323
|
}
|
|
7403
7324
|
returnValue = { ...returnValue, [key]: value };
|
|
7404
7325
|
}
|
|
7405
|
-
if (isObject3(source.hooks)) {
|
|
7406
|
-
hooks = mergeHooks(hooks, source.hooks);
|
|
7407
|
-
returnValue.hooks = hooks;
|
|
7408
|
-
}
|
|
7409
7326
|
if (isObject3(source.headers)) {
|
|
7410
7327
|
headers = mergeHeaders(headers, source.headers);
|
|
7411
7328
|
returnValue.headers = headers;
|
|
@@ -7415,10 +7332,10 @@ var deepMerge = (...sources) => {
|
|
|
7415
7332
|
return returnValue;
|
|
7416
7333
|
};
|
|
7417
7334
|
|
|
7418
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7335
|
+
// ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/utils/normalize.js
|
|
7419
7336
|
init_cjs_shims();
|
|
7420
7337
|
|
|
7421
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7338
|
+
// ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/core/constants.js
|
|
7422
7339
|
init_cjs_shims();
|
|
7423
7340
|
var supportsRequestStreams = (() => {
|
|
7424
7341
|
let duplexAccessed = false;
|
|
@@ -7492,7 +7409,7 @@ var requestOptionsRegistry = {
|
|
|
7492
7409
|
priority: true
|
|
7493
7410
|
};
|
|
7494
7411
|
|
|
7495
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7412
|
+
// ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/utils/normalize.js
|
|
7496
7413
|
var normalizeRequestMethod = (input) => requestMethods.includes(input) ? input.toUpperCase() : input;
|
|
7497
7414
|
var retryMethods = ["get", "put", "head", "delete", "options", "trace"];
|
|
7498
7415
|
var retryStatusCodes = [408, 413, 429, 500, 502, 503, 504];
|
|
@@ -7525,7 +7442,7 @@ var normalizeRetryOptions = (retry = {}) => {
|
|
|
7525
7442
|
};
|
|
7526
7443
|
};
|
|
7527
7444
|
|
|
7528
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7445
|
+
// ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/utils/timeout.js
|
|
7529
7446
|
init_cjs_shims();
|
|
7530
7447
|
async function timeout(request, init, abortController, options) {
|
|
7531
7448
|
return new Promise((resolve, reject) => {
|
|
@@ -7541,7 +7458,7 @@ async function timeout(request, init, abortController, options) {
|
|
|
7541
7458
|
});
|
|
7542
7459
|
}
|
|
7543
7460
|
|
|
7544
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7461
|
+
// ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/utils/delay.js
|
|
7545
7462
|
init_cjs_shims();
|
|
7546
7463
|
async function delay(ms, { signal }) {
|
|
7547
7464
|
return new Promise((resolve, reject) => {
|
|
@@ -7560,7 +7477,7 @@ async function delay(ms, { signal }) {
|
|
|
7560
7477
|
});
|
|
7561
7478
|
}
|
|
7562
7479
|
|
|
7563
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7480
|
+
// ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/utils/options.js
|
|
7564
7481
|
init_cjs_shims();
|
|
7565
7482
|
var findUnknownOptions = (request, options) => {
|
|
7566
7483
|
const unknownOptions = {};
|
|
@@ -7572,7 +7489,7 @@ var findUnknownOptions = (request, options) => {
|
|
|
7572
7489
|
return unknownOptions;
|
|
7573
7490
|
};
|
|
7574
7491
|
|
|
7575
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7492
|
+
// ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/core/Ky.js
|
|
7576
7493
|
var Ky = class _Ky {
|
|
7577
7494
|
static create(input, options) {
|
|
7578
7495
|
const ky2 = new _Ky(input, options);
|
|
@@ -7640,10 +7557,13 @@ var Ky = class _Ky {
|
|
|
7640
7557
|
// eslint-disable-next-line complexity
|
|
7641
7558
|
constructor(input, options = {}) {
|
|
7642
7559
|
this._input = input;
|
|
7560
|
+
const credentials = this._input instanceof Request && "credentials" in Request.prototype ? this._input.credentials : void 0;
|
|
7643
7561
|
this._options = {
|
|
7562
|
+
...credentials && { credentials },
|
|
7563
|
+
// For exactOptionalPropertyTypes
|
|
7644
7564
|
...options,
|
|
7645
7565
|
headers: mergeHeaders(this._input.headers, options.headers),
|
|
7646
|
-
hooks:
|
|
7566
|
+
hooks: deepMerge({
|
|
7647
7567
|
beforeRequest: [],
|
|
7648
7568
|
beforeRetry: [],
|
|
7649
7569
|
beforeError: [],
|
|
@@ -7671,10 +7591,12 @@ var Ky = class _Ky {
|
|
|
7671
7591
|
}
|
|
7672
7592
|
if (supportsAbortController) {
|
|
7673
7593
|
this.abortController = new globalThis.AbortController();
|
|
7674
|
-
|
|
7675
|
-
|
|
7676
|
-
this.
|
|
7677
|
-
|
|
7594
|
+
if (this._options.signal) {
|
|
7595
|
+
const originalSignal = this._options.signal;
|
|
7596
|
+
this._options.signal.addEventListener("abort", () => {
|
|
7597
|
+
this.abortController.abort(originalSignal.reason);
|
|
7598
|
+
});
|
|
7599
|
+
}
|
|
7678
7600
|
this._options.signal = this.abortController.signal;
|
|
7679
7601
|
}
|
|
7680
7602
|
if (supportsRequestStreams) {
|
|
@@ -7704,13 +7626,11 @@ var Ky = class _Ky {
|
|
|
7704
7626
|
if (!this._options.retry.statusCodes.includes(error.response.status)) {
|
|
7705
7627
|
throw error;
|
|
7706
7628
|
}
|
|
7707
|
-
const retryAfter = error.response.headers.get("Retry-After")
|
|
7629
|
+
const retryAfter = error.response.headers.get("Retry-After");
|
|
7708
7630
|
if (retryAfter && this._options.retry.afterStatusCodes.includes(error.response.status)) {
|
|
7709
7631
|
let after = Number(retryAfter) * 1e3;
|
|
7710
7632
|
if (Number.isNaN(after)) {
|
|
7711
7633
|
after = Date.parse(retryAfter) - Date.now();
|
|
7712
|
-
} else if (after >= Date.parse("2024-01-01")) {
|
|
7713
|
-
after -= Date.now();
|
|
7714
7634
|
}
|
|
7715
7635
|
const max = this._options.retry.maxRetryAfter ?? after;
|
|
7716
7636
|
return after < max ? after : max;
|
|
@@ -7814,7 +7734,7 @@ var Ky = class _Ky {
|
|
|
7814
7734
|
}
|
|
7815
7735
|
};
|
|
7816
7736
|
|
|
7817
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7737
|
+
// ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/index.js
|
|
7818
7738
|
var createInstance = (defaults) => {
|
|
7819
7739
|
const ky2 = (input, options) => Ky.create(input, validateAndMerge(defaults, options));
|
|
7820
7740
|
for (const method of requestMethods) {
|
|
@@ -9066,16 +8986,85 @@ function updateNotifier(options) {
|
|
|
9066
8986
|
return updateNotifier2;
|
|
9067
8987
|
}
|
|
9068
8988
|
|
|
8989
|
+
// package.json
|
|
8990
|
+
var package_default = {
|
|
8991
|
+
name: "@yamada-ui/cli",
|
|
8992
|
+
version: "1.1.0",
|
|
8993
|
+
description: "Generate theme tokens for autocomplete",
|
|
8994
|
+
keywords: [
|
|
8995
|
+
"theme",
|
|
8996
|
+
"theming",
|
|
8997
|
+
"typings",
|
|
8998
|
+
"generator",
|
|
8999
|
+
"yamada ui",
|
|
9000
|
+
"yamada",
|
|
9001
|
+
"ui mode",
|
|
9002
|
+
"ui"
|
|
9003
|
+
],
|
|
9004
|
+
author: "Hirotomo Yamada <hirotomo.yamada@avap.co.jp>",
|
|
9005
|
+
license: "MIT",
|
|
9006
|
+
main: "dist/index.js",
|
|
9007
|
+
files: [
|
|
9008
|
+
"dist",
|
|
9009
|
+
"bin"
|
|
9010
|
+
],
|
|
9011
|
+
sideEffects: false,
|
|
9012
|
+
publishConfig: {
|
|
9013
|
+
access: "public"
|
|
9014
|
+
},
|
|
9015
|
+
homepage: "https://yamada-ui.com",
|
|
9016
|
+
repository: {
|
|
9017
|
+
type: "git",
|
|
9018
|
+
url: "https://github.com/yamada-ui/yamada-ui",
|
|
9019
|
+
directory: "packages/cli"
|
|
9020
|
+
},
|
|
9021
|
+
bugs: {
|
|
9022
|
+
url: "https://github.com/yamada-ui/yamada-ui/issues"
|
|
9023
|
+
},
|
|
9024
|
+
bin: {
|
|
9025
|
+
"yamada-cli": "bin/index.js"
|
|
9026
|
+
},
|
|
9027
|
+
scripts: {
|
|
9028
|
+
clean: "rimraf dist .turbo",
|
|
9029
|
+
build: "tsup src --format cjs --clean --shims",
|
|
9030
|
+
dev: "pnpm build --watch",
|
|
9031
|
+
typecheck: " tsc --noEmit"
|
|
9032
|
+
},
|
|
9033
|
+
dependencies: {
|
|
9034
|
+
"@clack/prompts": "^0.7.0",
|
|
9035
|
+
"bundle-n-require": "^1.1.1",
|
|
9036
|
+
chokidar: "^3.6.0",
|
|
9037
|
+
"cli-check-node": "^1.3.4",
|
|
9038
|
+
"cli-handle-unhandled": "^1.1.1",
|
|
9039
|
+
"cli-welcome": "^2.2.3",
|
|
9040
|
+
commander: "^12.1.0",
|
|
9041
|
+
glob: "^11.0.0",
|
|
9042
|
+
prettier: "^3.3.3",
|
|
9043
|
+
tar: "^7.4.3",
|
|
9044
|
+
typescript: "^5.5.4"
|
|
9045
|
+
},
|
|
9046
|
+
devDependencies: {
|
|
9047
|
+
"@types/cli-welcome": "^2.2.2",
|
|
9048
|
+
"@types/update-notifier": "6.0.8",
|
|
9049
|
+
chalk: "^5.3.0",
|
|
9050
|
+
"update-notifier": "^7.2.0"
|
|
9051
|
+
}
|
|
9052
|
+
};
|
|
9053
|
+
|
|
9069
9054
|
// src/utils/cli.ts
|
|
9070
9055
|
var initCLI = async () => {
|
|
9071
9056
|
(0, import_cli_check_node.default)("12");
|
|
9072
9057
|
await (0, import_cli_handle_unhandled.default)();
|
|
9073
|
-
|
|
9074
|
-
|
|
9075
|
-
|
|
9076
|
-
|
|
9077
|
-
|
|
9078
|
-
|
|
9058
|
+
(0, import_cli_welcome.default)({
|
|
9059
|
+
title: "Yamada UI CLI",
|
|
9060
|
+
tagLine: `by Yamada UI
|
|
9061
|
+
${package_default.description}`,
|
|
9062
|
+
bgColor: `#3cc360`,
|
|
9063
|
+
color: `#FFFFFF`,
|
|
9064
|
+
bold: true,
|
|
9065
|
+
clear: false,
|
|
9066
|
+
version: package_default.version
|
|
9067
|
+
});
|
|
9079
9068
|
updateNotifier({
|
|
9080
9069
|
pkg: package_default,
|
|
9081
9070
|
shouldNotifyInNpmScript: true,
|
|
@@ -9348,8 +9337,8 @@ var generateThemeTypings = async ({
|
|
|
9348
9337
|
p.note(outPath, "Output path");
|
|
9349
9338
|
const end = process.hrtime.bigint();
|
|
9350
9339
|
const duration = (Number(end - start) / 1e9).toFixed(2);
|
|
9351
|
-
p.outro(
|
|
9352
|
-
`);
|
|
9340
|
+
p.outro(source_default.green(`Done in ${duration}s
|
|
9341
|
+
`));
|
|
9353
9342
|
} catch (e) {
|
|
9354
9343
|
s.stop(`An error occurred`, 500);
|
|
9355
9344
|
p.cancel(source_default.red(e instanceof Error ? e.message : "Message is missing"));
|
|
@@ -9553,7 +9542,7 @@ var replaceIndex = (content) => {
|
|
|
9553
9542
|
var generateTheme = async (outPath, fileMap, isReactReplace, isForceReplace) => {
|
|
9554
9543
|
if (!await isWriteable(import_path5.default.dirname(outPath))) {
|
|
9555
9544
|
throw new Error(
|
|
9556
|
-
"The provided path is not writable, please check folder permissions and try again
|
|
9545
|
+
"The provided path is not writable, please check folder permissions and try again.\nIt is likely you do not have write permissions for this folder."
|
|
9557
9546
|
);
|
|
9558
9547
|
}
|
|
9559
9548
|
await (0, import_promises2.mkdir)(outPath, { recursive: true });
|
|
@@ -9599,8 +9588,8 @@ var actionTheme = async (_outPath, { branch = DEFAULT_BRANCH_NAME, cwd, replace
|
|
|
9599
9588
|
s.stop(`Wrote the theme`);
|
|
9600
9589
|
const end = process.hrtime.bigint();
|
|
9601
9590
|
const duration = (Number(end - start) / 1e9).toFixed(2);
|
|
9602
|
-
p2.outro(
|
|
9603
|
-
`);
|
|
9591
|
+
p2.outro(source_default.green(`Done in ${duration}s
|
|
9592
|
+
`));
|
|
9604
9593
|
} catch (e) {
|
|
9605
9594
|
s.stop(`An error occurred`, 500);
|
|
9606
9595
|
p2.cancel(source_default.red(e instanceof Error ? e.message : "Message is missing"));
|
|
@@ -9610,10 +9599,18 @@ var actionTheme = async (_outPath, { branch = DEFAULT_BRANCH_NAME, cwd, replace
|
|
|
9610
9599
|
// src/index.ts
|
|
9611
9600
|
var run = async () => {
|
|
9612
9601
|
await initCLI();
|
|
9613
|
-
|
|
9614
|
-
program.command("
|
|
9615
|
-
program.
|
|
9616
|
-
|
|
9602
|
+
import_commander.program.command("tokens <path>").option("-o, --out <path>", `Output file to ${path13.join(...themePath)}`).option("-w, --watch [path]", "Watch directory for changes and rebuild").action(actionTokens);
|
|
9603
|
+
import_commander.program.command("theme <path>").option("-b, --branch <branch>", "Branch to download").option("--cwd <path>", "Current working directory").option("-r, --replace", "Force replace the theme").action(actionTheme);
|
|
9604
|
+
import_commander.program.on("-h, --help", () => {
|
|
9605
|
+
console.info(`
|
|
9606
|
+
Example call:
|
|
9607
|
+
`);
|
|
9608
|
+
console.info(`$ yamada-cli tokens theme.ts
|
|
9609
|
+
`);
|
|
9610
|
+
console.info(`$ yamada-cli theme ./theme
|
|
9611
|
+
`);
|
|
9612
|
+
});
|
|
9613
|
+
import_commander.program.parse();
|
|
9617
9614
|
};
|
|
9618
9615
|
// Annotate the CommonJS export names for ESM import in node:
|
|
9619
9616
|
0 && (module.exports = {
|