@yamada-ui/cli 1.1.1-dev-20240825090212 → 1.1.1-dev-20240825094045

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.
@@ -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.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
33
+ // ../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.14_@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.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"() {
35
+ "../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.14_@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(source_default.green(`Done in ${duration}s
830
- `));
829
+ p.outro(`${source_default.green(`Done`)} in ${source_default.dim(`${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.\nIt is likely you do not have write permissions for this folder."
1034
+ "The provided path is not writable, please check folder permissions and try again. It 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(source_default.green(`Done in ${duration}s
1081
- `));
1080
+ p2.outro(`${source_default.green(`Done`)} in ${source_default.dim(`${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.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
33
+ // ../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.14_@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.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"() {
35
+ "../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.14_@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.\nIt is likely you do not have write permissions for this folder."
736
+ "The provided path is not writable, please check folder permissions and try again. It 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(source_default.green(`Done in ${duration}s
783
- `));
782
+ p.outro(`${source_default.green(`Done`)} in ${source_default.dim(`${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.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
33
+ // ../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.14_@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.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"() {
35
+ "../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.14_@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.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
33
+ // ../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.14_@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.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"() {
35
+ "../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.14_@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(source_default.green(`Done in ${duration}s
826
- `));
825
+ p.outro(`${source_default.green(`Done`)} in ${source_default.dim(`${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.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
+ // ../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.14_@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.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"() {
39
+ "../../node_modules/.pnpm/tsup@8.2.4_@swc+core@1.7.14_@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,6 +1167,8 @@ 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.
1170
1172
  case "prerelease":
1171
1173
  if (this.prerelease.length === 0) {
1172
1174
  this.inc("patch", identifier, identifierBase);
@@ -1194,6 +1196,8 @@ var require_semver = __commonJS({
1194
1196
  }
1195
1197
  this.prerelease = [];
1196
1198
  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.
1197
1201
  case "pre": {
1198
1202
  const base = Number(identifierBase) ? 1 : 0;
1199
1203
  if (!identifier && identifierBase === false) {
@@ -2299,6 +2303,7 @@ var require_min_version = __commonJS({
2299
2303
  compver.prerelease.push(0);
2300
2304
  }
2301
2305
  compver.raw = compver.format();
2306
+ /* fallthrough */
2302
2307
  case "":
2303
2308
  case ">=":
2304
2309
  if (!setMin || gt(compver, setMin)) {
@@ -2308,6 +2313,7 @@ var require_min_version = __commonJS({
2308
2313
  case "<":
2309
2314
  case "<=":
2310
2315
  break;
2316
+ /* istanbul ignore next */
2311
2317
  default:
2312
2318
  throw new Error(`Unexpected operation: ${comparator.operator}`);
2313
2319
  }
@@ -3378,7 +3384,7 @@ var require_rc = __commonJS({
3378
3384
  "use strict";
3379
3385
  init_cjs_shims();
3380
3386
  var cc = require_utils();
3381
- var join2 = require("path").join;
3387
+ var join = require("path").join;
3382
3388
  var deepExtend = require_deep_extend();
3383
3389
  var etc = "/etc";
3384
3390
  var win = process.platform === "win32";
@@ -3403,15 +3409,15 @@ var require_rc = __commonJS({
3403
3409
  }
3404
3410
  if (!win)
3405
3411
  [
3406
- join2(etc, name, "config"),
3407
- join2(etc, name + "rc")
3412
+ join(etc, name, "config"),
3413
+ join(etc, name + "rc")
3408
3414
  ].forEach(addConfigFile);
3409
3415
  if (home)
3410
3416
  [
3411
- join2(home, ".config", name, "config"),
3412
- join2(home, ".config", name),
3413
- join2(home, "." + name, "config"),
3414
- join2(home, "." + name + "rc")
3417
+ join(home, ".config", name, "config"),
3418
+ join(home, ".config", name),
3419
+ join(home, "." + name, "config"),
3420
+ join(home, "." + name + "rc")
3415
3421
  ].forEach(addConfigFile);
3416
3422
  addConfigFile(cc.find("." + name + "rc"));
3417
3423
  if (env4.config) addConfigFile(env4.config);
@@ -4715,6 +4721,7 @@ var require_util = __commonJS({
4715
4721
  return true;
4716
4722
  }
4717
4723
  switch (field) {
4724
+ // eslint-disable-line default-case
4718
4725
  case "true": {
4719
4726
  return true;
4720
4727
  }
@@ -5912,18 +5919,7 @@ __export(src_exports, {
5912
5919
  });
5913
5920
  module.exports = __toCommonJS(src_exports);
5914
5921
  init_cjs_shims();
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");
5922
+ var import_path6 = __toESM(require("path"));
5927
5923
 
5928
5924
  // ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
5929
5925
  init_cjs_shims();
@@ -6420,7 +6416,81 @@ var chalk = createChalk();
6420
6416
  var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
6421
6417
  var source_default = chalk;
6422
6418
 
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
+
6423
6488
  // 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");
6424
6494
  var import_chokidar = __toESM(require("chokidar"));
6425
6495
 
6426
6496
  // src/command/tokens/create-theme-typings.ts
@@ -6436,7 +6506,6 @@ var isArray = (value) => Array.isArray(value);
6436
6506
  init_cjs_shims();
6437
6507
  var import_cli_check_node = __toESM(require("cli-check-node"));
6438
6508
  var import_cli_handle_unhandled = __toESM(require("cli-handle-unhandled"));
6439
- var import_cli_welcome = __toESM(require("cli-welcome"));
6440
6509
 
6441
6510
  // ../../node_modules/.pnpm/update-notifier@7.2.0/node_modules/update-notifier/index.js
6442
6511
  init_cjs_shims();
@@ -7242,13 +7311,13 @@ init_cjs_shims();
7242
7311
  // ../../node_modules/.pnpm/package-json@10.0.1/node_modules/package-json/index.js
7243
7312
  init_cjs_shims();
7244
7313
 
7245
- // ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/index.js
7314
+ // ../../node_modules/.pnpm/ky@1.7.1/node_modules/ky/distribution/index.js
7246
7315
  init_cjs_shims();
7247
7316
 
7248
- // ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/core/Ky.js
7317
+ // ../../node_modules/.pnpm/ky@1.7.1/node_modules/ky/distribution/core/Ky.js
7249
7318
  init_cjs_shims();
7250
7319
 
7251
- // ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/errors/HTTPError.js
7320
+ // ../../node_modules/.pnpm/ky@1.7.1/node_modules/ky/distribution/errors/HTTPError.js
7252
7321
  init_cjs_shims();
7253
7322
  var HTTPError = class extends Error {
7254
7323
  response;
@@ -7267,7 +7336,7 @@ var HTTPError = class extends Error {
7267
7336
  }
7268
7337
  };
7269
7338
 
7270
- // ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/errors/TimeoutError.js
7339
+ // ../../node_modules/.pnpm/ky@1.7.1/node_modules/ky/distribution/errors/TimeoutError.js
7271
7340
  init_cjs_shims();
7272
7341
  var TimeoutError = class extends Error {
7273
7342
  request;
@@ -7278,14 +7347,14 @@ var TimeoutError = class extends Error {
7278
7347
  }
7279
7348
  };
7280
7349
 
7281
- // ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/utils/merge.js
7350
+ // ../../node_modules/.pnpm/ky@1.7.1/node_modules/ky/distribution/utils/merge.js
7282
7351
  init_cjs_shims();
7283
7352
 
7284
- // ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/utils/is.js
7353
+ // ../../node_modules/.pnpm/ky@1.7.1/node_modules/ky/distribution/utils/is.js
7285
7354
  init_cjs_shims();
7286
7355
  var isObject3 = (value) => value !== null && typeof value === "object";
7287
7356
 
7288
- // ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/utils/merge.js
7357
+ // ../../node_modules/.pnpm/ky@1.7.1/node_modules/ky/distribution/utils/merge.js
7289
7358
  var validateAndMerge = (...sources) => {
7290
7359
  for (const source of sources) {
7291
7360
  if ((!isObject3(source) || Array.isArray(source)) && source !== void 0) {
@@ -7307,9 +7376,19 @@ var mergeHeaders = (source1 = {}, source2 = {}) => {
7307
7376
  }
7308
7377
  return result;
7309
7378
  };
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
+ });
7310
7388
  var deepMerge = (...sources) => {
7311
7389
  let returnValue = {};
7312
7390
  let headers = {};
7391
+ let hooks = {};
7313
7392
  for (const source of sources) {
7314
7393
  if (Array.isArray(source)) {
7315
7394
  if (!Array.isArray(returnValue)) {
@@ -7323,6 +7402,10 @@ var deepMerge = (...sources) => {
7323
7402
  }
7324
7403
  returnValue = { ...returnValue, [key]: value };
7325
7404
  }
7405
+ if (isObject3(source.hooks)) {
7406
+ hooks = mergeHooks(hooks, source.hooks);
7407
+ returnValue.hooks = hooks;
7408
+ }
7326
7409
  if (isObject3(source.headers)) {
7327
7410
  headers = mergeHeaders(headers, source.headers);
7328
7411
  returnValue.headers = headers;
@@ -7332,10 +7415,10 @@ var deepMerge = (...sources) => {
7332
7415
  return returnValue;
7333
7416
  };
7334
7417
 
7335
- // ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/utils/normalize.js
7418
+ // ../../node_modules/.pnpm/ky@1.7.1/node_modules/ky/distribution/utils/normalize.js
7336
7419
  init_cjs_shims();
7337
7420
 
7338
- // ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/core/constants.js
7421
+ // ../../node_modules/.pnpm/ky@1.7.1/node_modules/ky/distribution/core/constants.js
7339
7422
  init_cjs_shims();
7340
7423
  var supportsRequestStreams = (() => {
7341
7424
  let duplexAccessed = false;
@@ -7409,7 +7492,7 @@ var requestOptionsRegistry = {
7409
7492
  priority: true
7410
7493
  };
7411
7494
 
7412
- // ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/utils/normalize.js
7495
+ // ../../node_modules/.pnpm/ky@1.7.1/node_modules/ky/distribution/utils/normalize.js
7413
7496
  var normalizeRequestMethod = (input) => requestMethods.includes(input) ? input.toUpperCase() : input;
7414
7497
  var retryMethods = ["get", "put", "head", "delete", "options", "trace"];
7415
7498
  var retryStatusCodes = [408, 413, 429, 500, 502, 503, 504];
@@ -7442,7 +7525,7 @@ var normalizeRetryOptions = (retry = {}) => {
7442
7525
  };
7443
7526
  };
7444
7527
 
7445
- // ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/utils/timeout.js
7528
+ // ../../node_modules/.pnpm/ky@1.7.1/node_modules/ky/distribution/utils/timeout.js
7446
7529
  init_cjs_shims();
7447
7530
  async function timeout(request, init, abortController, options) {
7448
7531
  return new Promise((resolve, reject) => {
@@ -7458,7 +7541,7 @@ async function timeout(request, init, abortController, options) {
7458
7541
  });
7459
7542
  }
7460
7543
 
7461
- // ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/utils/delay.js
7544
+ // ../../node_modules/.pnpm/ky@1.7.1/node_modules/ky/distribution/utils/delay.js
7462
7545
  init_cjs_shims();
7463
7546
  async function delay(ms, { signal }) {
7464
7547
  return new Promise((resolve, reject) => {
@@ -7477,7 +7560,7 @@ async function delay(ms, { signal }) {
7477
7560
  });
7478
7561
  }
7479
7562
 
7480
- // ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/utils/options.js
7563
+ // ../../node_modules/.pnpm/ky@1.7.1/node_modules/ky/distribution/utils/options.js
7481
7564
  init_cjs_shims();
7482
7565
  var findUnknownOptions = (request, options) => {
7483
7566
  const unknownOptions = {};
@@ -7489,7 +7572,7 @@ var findUnknownOptions = (request, options) => {
7489
7572
  return unknownOptions;
7490
7573
  };
7491
7574
 
7492
- // ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/core/Ky.js
7575
+ // ../../node_modules/.pnpm/ky@1.7.1/node_modules/ky/distribution/core/Ky.js
7493
7576
  var Ky = class _Ky {
7494
7577
  static create(input, options) {
7495
7578
  const ky2 = new _Ky(input, options);
@@ -7557,13 +7640,10 @@ var Ky = class _Ky {
7557
7640
  // eslint-disable-next-line complexity
7558
7641
  constructor(input, options = {}) {
7559
7642
  this._input = input;
7560
- const credentials = this._input instanceof Request && "credentials" in Request.prototype ? this._input.credentials : void 0;
7561
7643
  this._options = {
7562
- ...credentials && { credentials },
7563
- // For exactOptionalPropertyTypes
7564
7644
  ...options,
7565
7645
  headers: mergeHeaders(this._input.headers, options.headers),
7566
- hooks: deepMerge({
7646
+ hooks: mergeHooks({
7567
7647
  beforeRequest: [],
7568
7648
  beforeRetry: [],
7569
7649
  beforeError: [],
@@ -7591,12 +7671,10 @@ var Ky = class _Ky {
7591
7671
  }
7592
7672
  if (supportsAbortController) {
7593
7673
  this.abortController = new globalThis.AbortController();
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
- }
7674
+ const originalSignal = this._options.signal ?? this._input.signal;
7675
+ originalSignal?.addEventListener("abort", () => {
7676
+ this.abortController.abort(originalSignal.reason);
7677
+ });
7600
7678
  this._options.signal = this.abortController.signal;
7601
7679
  }
7602
7680
  if (supportsRequestStreams) {
@@ -7626,11 +7704,13 @@ var Ky = class _Ky {
7626
7704
  if (!this._options.retry.statusCodes.includes(error.response.status)) {
7627
7705
  throw error;
7628
7706
  }
7629
- const retryAfter = error.response.headers.get("Retry-After");
7707
+ const retryAfter = error.response.headers.get("Retry-After") ?? error.response.headers.get("RateLimit-Reset") ?? error.response.headers.get("X-RateLimit-Reset") ?? error.response.headers.get("X-Rate-Limit-Reset");
7630
7708
  if (retryAfter && this._options.retry.afterStatusCodes.includes(error.response.status)) {
7631
7709
  let after = Number(retryAfter) * 1e3;
7632
7710
  if (Number.isNaN(after)) {
7633
7711
  after = Date.parse(retryAfter) - Date.now();
7712
+ } else if (after >= Date.parse("2024-01-01")) {
7713
+ after -= Date.now();
7634
7714
  }
7635
7715
  const max = this._options.retry.maxRetryAfter ?? after;
7636
7716
  return after < max ? after : max;
@@ -7734,7 +7814,7 @@ var Ky = class _Ky {
7734
7814
  }
7735
7815
  };
7736
7816
 
7737
- // ../../node_modules/.pnpm/ky@1.5.0/node_modules/ky/distribution/index.js
7817
+ // ../../node_modules/.pnpm/ky@1.7.1/node_modules/ky/distribution/index.js
7738
7818
  var createInstance = (defaults) => {
7739
7819
  const ky2 = (input, options) => Ky.create(input, validateAndMerge(defaults, options));
7740
7820
  for (const method of requestMethods) {
@@ -8986,85 +9066,16 @@ function updateNotifier(options) {
8986
9066
  return updateNotifier2;
8987
9067
  }
8988
9068
 
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
-
9054
9069
  // src/utils/cli.ts
9055
9070
  var initCLI = async () => {
9056
9071
  (0, import_cli_check_node.default)("12");
9057
9072
  await (0, import_cli_handle_unhandled.default)();
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
- });
9073
+ console.log(
9074
+ `
9075
+ ${source_default.bold.green("Yamada UI CLI")} v${package_default.version} ${source_default.dim("by Yamada UI")}`
9076
+ );
9077
+ console.log(`${source_default.dim(package_default.description)}
9078
+ `);
9068
9079
  updateNotifier({
9069
9080
  pkg: package_default,
9070
9081
  shouldNotifyInNpmScript: true,
@@ -9337,8 +9348,8 @@ var generateThemeTypings = async ({
9337
9348
  p.note(outPath, "Output path");
9338
9349
  const end = process.hrtime.bigint();
9339
9350
  const duration = (Number(end - start) / 1e9).toFixed(2);
9340
- p.outro(source_default.green(`Done in ${duration}s
9341
- `));
9351
+ p.outro(`${source_default.green(`Done`)} in ${source_default.dim(`${duration}s`)}
9352
+ `);
9342
9353
  } catch (e) {
9343
9354
  s.stop(`An error occurred`, 500);
9344
9355
  p.cancel(source_default.red(e instanceof Error ? e.message : "Message is missing"));
@@ -9542,7 +9553,7 @@ var replaceIndex = (content) => {
9542
9553
  var generateTheme = async (outPath, fileMap, isReactReplace, isForceReplace) => {
9543
9554
  if (!await isWriteable(import_path5.default.dirname(outPath))) {
9544
9555
  throw new Error(
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."
9556
+ "The provided path is not writable, please check folder permissions and try again. It is likely you do not have write permissions for this folder."
9546
9557
  );
9547
9558
  }
9548
9559
  await (0, import_promises2.mkdir)(outPath, { recursive: true });
@@ -9588,8 +9599,8 @@ var actionTheme = async (_outPath, { branch = DEFAULT_BRANCH_NAME, cwd, replace
9588
9599
  s.stop(`Wrote the theme`);
9589
9600
  const end = process.hrtime.bigint();
9590
9601
  const duration = (Number(end - start) / 1e9).toFixed(2);
9591
- p2.outro(source_default.green(`Done in ${duration}s
9592
- `));
9602
+ p2.outro(`${source_default.green(`Done`)} in ${source_default.dim(`${duration}s`)}
9603
+ `);
9593
9604
  } catch (e) {
9594
9605
  s.stop(`An error occurred`, 500);
9595
9606
  p2.cancel(source_default.red(e instanceof Error ? e.message : "Message is missing"));
@@ -9599,18 +9610,10 @@ var actionTheme = async (_outPath, { branch = DEFAULT_BRANCH_NAME, cwd, replace
9599
9610
  // src/index.ts
9600
9611
  var run = async () => {
9601
9612
  await initCLI();
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();
9613
+ const program = new import_commander.Command(package_default.name).name("yamada-cli").description(package_default.description).version(package_default.version).usage(`${source_default.green("<command>")} [options]`);
9614
+ program.command("tokens <path>").option("-o, --out <path>", `Output file to ${import_path6.default.join(...themePath)}`).option("-w, --watch [path]", "Watch directory for changes and rebuild").action(actionTokens);
9615
+ 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);
9616
+ program.parse();
9614
9617
  };
9615
9618
  // Annotate the CommonJS export names for ESM import in node:
9616
9619
  0 && (module.exports = {