@fishawack/lab-env 4.32.1 → 4.33.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## Changelog
2
2
 
3
+ ### 4.33.1 (2024-07-16)
4
+ * [Bug] allow env var for REPO to be set prior to running lab-env
5
+
6
+ ### 4.33.0 (2024-07-15)
7
+ * [Feature] can now specify the root fw directory
8
+
3
9
  ### 4.32.1 (2024-07-15)
4
10
  * [Bug] added more ci skip steps to dianose command
5
11
 
@@ -8,10 +8,10 @@ services:
8
8
  tty: true
9
9
  volumes:
10
10
  - $CWD/:/app
11
- - $HOME/.gitconfig:/root/.gitconfig
12
- - $HOME/targets:/root/targets
13
- - $HOME/.ssh:/root/.ssh
14
- - $HOME/.aws:/root/.aws
11
+ - $FW_DIR/.gitconfig:/root/.gitconfig
12
+ - $FW_DIR/targets:/root/targets
13
+ - $FW_DIR/.ssh:/root/.ssh
14
+ - $FW_DIR/.aws:/root/.aws
15
15
  - node_modules:/app/node_modules
16
16
  ports:
17
17
  - ${PORT:-3000}:${PORT:-3000}
@@ -13,9 +13,9 @@ services:
13
13
  tty: true
14
14
  volumes:
15
15
  - $CWD/:/app
16
- - $HOME/targets:/home/node/targets
17
- - $HOME/.ssh:/home/node/.ssh
18
- - $HOME/.aws:/home/node/.aws
16
+ - $FW_DIR/targets:/home/node/targets
17
+ - $FW_DIR/.ssh:/home/node/.ssh
18
+ - $FW_DIR/.aws:/home/node/.aws
19
19
  - node_modules:/app/node_modules
20
20
  ports:
21
21
  - ${PORT:-3000}:${PORT:-3000}
package/globals.js CHANGED
@@ -11,6 +11,7 @@ const args = hideBin(process.argv);
11
11
  process.env.DIRNAME = __dirname;
12
12
  process.env.USER_UID=execSync("id -u", {encoding: 'utf8', stdio: 'pipe'}).trim();
13
13
  process.env.USER_GID=execSync("id -g", {encoding: 'utf8', stdio: 'pipe'}).trim();
14
+ process.env.FW_DIR = process.env.FW_DIR || process.env.HOME;
14
15
 
15
16
  const cwd = process.cwd();
16
17
 
@@ -52,7 +53,7 @@ try{
52
53
  repo = path.basename(cwd);
53
54
  }
54
55
 
55
- process.env.REPO = repo;
56
+ process.env.REPO = process.env.REPO || repo;
56
57
 
57
58
  const repo_safe = repo.replace(/\./g, '');
58
59
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fishawack/lab-env",
3
- "version": "4.32.1",
3
+ "version": "4.33.1",
4
4
  "description": "Docker manager for FW",
5
5
  "main": "cli.js",
6
6
  "scripts": {