@buildepicshit/cli 0.0.8 → 0.0.10
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 +11 -1
- package/dist/bes.js.map +3 -3
- package/package.json +1 -1
- package/src/config-loader.ts +7 -1
- package/src/orchestrator/core/__tests__/command.test.ts +45 -35
- package/src/orchestrator/core/command.ts +28 -11
- package/src/orchestrator/core/types.ts +1 -0
- package/src/orchestrator/presets/docker.ts +4 -0
- package/src/orchestrator/presets/nextjs.ts +9 -3
- package/src/orchestrator/utils/__tests__/dna.test.ts +68 -72
- package/src/orchestrator/utils/config-context.ts +14 -0
- package/src/orchestrator/utils/dna.ts +24 -20
- package/src/orchestrator/utils/port.ts +51 -0
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
|
|
3750
|
+
root
|
|
3741
3751
|
};
|
|
3742
3752
|
}
|
|
3743
3753
|
|