bdy 1.22.52-dev → 1.22.53-beta

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.22.52-dev",
4
+ "version": "1.22.53-beta",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "scripts": {
@@ -864,14 +864,20 @@ class Input {
864
864
  return p;
865
865
  }
866
866
  static restApiWorkspace(workspace, allowNull, ignoreProjectConfig = false) {
867
+ // Inside a sandbox, cfg/project cfg (set by an explicit `bdy login` or .bdy/cfg.json)
868
+ // takes precedence over the sandbox-injected BUDDY_WORKSPACE env var.
869
+ // Outside a sandbox, env beats cfg.
867
870
  const ProjectCfg = require('./project/cfg').default;
868
- let w = process.env.BUDDY_WORKSPACE;
869
- if (workspace)
870
- w = workspace;
871
+ let w = workspace;
872
+ const inSandbox = (0, utils_1.isInSandbox)();
873
+ if (!w && !inSandbox && process.env.BUDDY_WORKSPACE)
874
+ w = process.env.BUDDY_WORKSPACE;
871
875
  if (!w && !ignoreProjectConfig)
872
876
  w = ProjectCfg.getWorkspace();
873
877
  if (!w)
874
878
  w = cfg_1.default.getWorkspace();
879
+ if (!w && inSandbox && process.env.BUDDY_WORKSPACE)
880
+ w = process.env.BUDDY_WORKSPACE;
875
881
  if (!w) {
876
882
  if (allowNull)
877
883
  return null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.22.52-dev",
4
+ "version": "1.22.53-beta",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "scripts": {