@ic-reactor/cli 0.0.0-dev1 → 0.0.0-dev2

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -46,12 +46,9 @@ function saveConfig(config, configPath = path.join(process.cwd(), CONFIG_FILE_NA
46
46
  fs.writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n");
47
47
  }
48
48
  function getProjectRoot() {
49
- let currentDir = process.cwd();
50
- while (currentDir !== path.dirname(currentDir)) {
51
- if (fs.existsSync(path.join(currentDir, "package.json"))) {
52
- return currentDir;
53
- }
54
- currentDir = path.dirname(currentDir);
49
+ const configPath = findConfigFile();
50
+ if (configPath) {
51
+ return path.dirname(configPath);
55
52
  }
56
53
  return process.cwd();
57
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ic-reactor/cli",
3
- "version": "0.0.0-dev1",
3
+ "version": "0.0.0-dev2",
4
4
  "type": "module",
5
5
  "description": "CLI tool to generate shadcn-style React hooks for ICP canisters",
6
6
  "main": "dist/index.js",