@buildepicshit/cli 0.0.8 → 0.0.9

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/bes.js CHANGED
@@ -3699,6 +3699,14 @@ function setupCompletion(commandNames) {
3699
3699
  import { existsSync } from "node:fs";
3700
3700
  import { dirname, join, resolve } from "node:path";
3701
3701
  import { createJiti } from "jiti";
3702
+
3703
+ // src/orchestrator/utils/config-context.ts
3704
+ var KEY = "__bes_config_root__";
3705
+ function setConfigRoot(root) {
3706
+ globalThis[KEY] = root;
3707
+ }
3708
+
3709
+ // src/config-loader.ts
3702
3710
  var CONFIG_FILENAME = "bes.config.ts";
3703
3711
  function findConfigFile(startDir) {
3704
3712
  let dir = resolve(startDir);
@@ -3718,6 +3726,8 @@ async function loadConfig(cwd = process.cwd()) {
3718
3726
  `Could not find ${CONFIG_FILENAME} in ${cwd} or any parent directory`
3719
3727
  );
3720
3728
  }
3729
+ const root = dirname(configPath);
3730
+ setConfigRoot(root);
3721
3731
  const jiti = createJiti(configPath, {
3722
3732
  fsCache: false,
3723
3733
  interopDefault: true
@@ -3737,7 +3747,7 @@ async function loadConfig(cwd = process.cwd()) {
3737
3747
  }
3738
3748
  return {
3739
3749
  commands,
3740
- root: dirname(configPath)
3750
+ root
3741
3751
  };
3742
3752
  }
3743
3753