@yamada-ui/cli 0.0.0-dev-20231209120554 → 0.0.0-dev-20231209133759

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.
@@ -5351,9 +5351,8 @@ __export(tokens_exports, {
5351
5351
  });
5352
5352
  module.exports = __toCommonJS(tokens_exports);
5353
5353
  init_cjs_shims();
5354
- var import_fs2 = require("fs");
5354
+ var import_promises = require("fs/promises");
5355
5355
  var import_path2 = __toESM(require("path"));
5356
- var import_util2 = require("util");
5357
5356
  var import_bundle_n_require = require("bundle-n-require");
5358
5357
  var import_chokidar = __toESM(require("chokidar"));
5359
5358
 
@@ -6587,10 +6586,8 @@ export interface GeneratedTheme extends UITheme { ${print(
6587
6586
 
6588
6587
  // src/command/tokens/resolve-output-path.ts
6589
6588
  init_cjs_shims();
6590
- var import_fs = __toESM(require("fs"));
6591
6589
  var import_path = __toESM(require("path"));
6592
- var import_util = require("util");
6593
- var exists = (0, import_util.promisify)(import_fs.default.exists);
6590
+ var import_glob = require("glob");
6594
6591
  var themePath = [
6595
6592
  "node_modules",
6596
6593
  "@yamada-ui",
@@ -6599,24 +6596,22 @@ var themePath = [
6599
6596
  "generated-theme.types.d.ts"
6600
6597
  ];
6601
6598
  var resolveThemePath = async () => {
6602
- const basePath = import_path.default.join("..", "..", "..");
6603
- const rootPath = process.cwd();
6604
6599
  const paths = [
6605
- import_path.default.resolve(basePath, "..", ...themePath),
6606
- import_path.default.resolve(basePath, "..", "..", ...themePath),
6607
- import_path.default.resolve(rootPath, ...themePath),
6608
- import_path.default.resolve(rootPath, "..", ...themePath),
6609
- import_path.default.resolve(rootPath, "..", "..", ...themePath)
6600
+ import_path.default.join("node_modules", ".pnpm", "@yamada-ui+core@*", ...themePath),
6601
+ import_path.default.join(...themePath)
6610
6602
  ];
6611
6603
  const triedPaths = await Promise.all(
6612
6604
  paths.map(async (possiblePath) => {
6613
- const isExist = await exists(possiblePath);
6614
- if (isExist)
6615
- return possiblePath;
6605
+ const paths2 = await (0, import_glob.glob)(possiblePath);
6606
+ if (paths2.length)
6607
+ return paths2[0];
6616
6608
  return "";
6617
6609
  })
6618
6610
  );
6619
- return triedPaths.find(Boolean);
6611
+ const resolvedPath = triedPaths.find(Boolean);
6612
+ if (!resolvedPath)
6613
+ return;
6614
+ return import_path.default.resolve(process.cwd(), resolvedPath);
6620
6615
  };
6621
6616
  var resolveOutputPath = async (outPath) => {
6622
6617
  if (outPath)
@@ -6630,7 +6625,6 @@ var resolveOutputPath = async (outPath) => {
6630
6625
  };
6631
6626
 
6632
6627
  // src/command/tokens/index.ts
6633
- var writeFileAsync = (0, import_util2.promisify)(import_fs2.writeFile);
6634
6628
  var generateThemeTypings = async ({
6635
6629
  theme,
6636
6630
  outFile
@@ -6642,7 +6636,7 @@ var generateThemeTypings = async ({
6642
6636
  const outPath = await resolveOutputPath(outFile);
6643
6637
  spinner.info();
6644
6638
  spinner.text = `Write file "${outPath}"...`;
6645
- await writeFileAsync(outPath, generatedTheme, "utf8");
6639
+ await (0, import_promises.writeFile)(outPath, generatedTheme, "utf8");
6646
6640
  const end = process.hrtime.bigint();
6647
6641
  const duration = (Number(end - start) / 1e9).toFixed(2);
6648
6642
  spinner.succeed(`Done in ${duration}s
@@ -34,10 +34,8 @@ __export(resolve_output_path_exports, {
34
34
  themePath: () => themePath
35
35
  });
36
36
  module.exports = __toCommonJS(resolve_output_path_exports);
37
- var import_fs = __toESM(require("fs"));
38
37
  var import_path = __toESM(require("path"));
39
- var import_util = require("util");
40
- var exists = (0, import_util.promisify)(import_fs.default.exists);
38
+ var import_glob = require("glob");
41
39
  var themePath = [
42
40
  "node_modules",
43
41
  "@yamada-ui",
@@ -46,24 +44,22 @@ var themePath = [
46
44
  "generated-theme.types.d.ts"
47
45
  ];
48
46
  var resolveThemePath = async () => {
49
- const basePath = import_path.default.join("..", "..", "..");
50
- const rootPath = process.cwd();
51
47
  const paths = [
52
- import_path.default.resolve(basePath, "..", ...themePath),
53
- import_path.default.resolve(basePath, "..", "..", ...themePath),
54
- import_path.default.resolve(rootPath, ...themePath),
55
- import_path.default.resolve(rootPath, "..", ...themePath),
56
- import_path.default.resolve(rootPath, "..", "..", ...themePath)
48
+ import_path.default.join("node_modules", ".pnpm", "@yamada-ui+core@*", ...themePath),
49
+ import_path.default.join(...themePath)
57
50
  ];
58
51
  const triedPaths = await Promise.all(
59
52
  paths.map(async (possiblePath) => {
60
- const isExist = await exists(possiblePath);
61
- if (isExist)
62
- return possiblePath;
53
+ const paths2 = await (0, import_glob.glob)(possiblePath);
54
+ if (paths2.length)
55
+ return paths2[0];
63
56
  return "";
64
57
  })
65
58
  );
66
- return triedPaths.find(Boolean);
59
+ const resolvedPath = triedPaths.find(Boolean);
60
+ if (!resolvedPath)
61
+ return;
62
+ return import_path.default.resolve(process.cwd(), resolvedPath);
67
63
  };
68
64
  var resolveOutputPath = async (outPath) => {
69
65
  if (outPath)