@leverege/build-tools 2.5.35 → 2.5.37

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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.5.35",
3
+ "version": "2.5.37",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -63,21 +63,21 @@
63
63
  "inquirer": "^7.3.3",
64
64
  "js-yaml": "^4.0.0",
65
65
  "ncp": "^2.0.0",
66
- "npm-check-updates": "^11.1.9",
66
+ "npm-check-updates": "^11.4.1",
67
67
  "npm-registry-fetch": "^9.0.0",
68
68
  "open": "^7.4.2",
69
- "ora": "^5.3.0",
69
+ "ora": "^5.4.0",
70
70
  "parse-gitignore": "^1.0.1",
71
71
  "readline-sync": "^1.4.10",
72
- "semver": "^7.3.4",
73
- "simple-git": "^2.35.2"
72
+ "semver": "^7.3.5",
73
+ "simple-git": "^2.37.0"
74
74
  },
75
75
  "devDependencies": {
76
- "@babel/cli": "^7.13.0",
77
- "@babel/core": "^7.13.1",
78
- "@babel/node": "^7.13.0",
76
+ "@babel/cli": "^7.13.14",
77
+ "@babel/core": "^7.13.15",
78
+ "@babel/node": "^7.13.13",
79
79
  "@leverege/babel-preset-leverege-node": "^1.1.1",
80
80
  "@leverege/eslint-config-leverege": "^2.2.0",
81
- "npm": "^7.5.6"
81
+ "npm": "^7.9.0"
82
82
  }
83
83
  }
package/src/k8x CHANGED
@@ -1,13 +1,16 @@
1
1
  #!/bin/bash
2
2
 
3
+ cmd=${@:-"bash"}
4
+
5
+ [ "$cmd" = "redis" ] || [ "$cmd" = "redis-cli" ] && FZFQ="--query=redis" && cmd='redis-cli'
6
+
3
7
  [ -f overwhelm.yaml ] && [ -f package.json ] && npm run ahoy
4
8
 
5
9
  [ ! -x "$(command -v fzf)" ] && printf "\n***ERROR: Missing fzf fuzzy matcher => brew install fzf\n\n" && exit 1
6
10
 
7
- pod=$(kubectl get pods --all-namespaces -owide | fzf | awk '{print $1, $2}')
8
- cmd=${@:-"bash"}
11
+ pod=$(kubectl -n default get pods -owide | fzf $FZFQ | awk '{print $1}')
9
12
 
10
- kubecmd="kubectl exec -it --namespace $pod -- $cmd"
13
+ kubecmd="kubectl exec -it $pod -- $cmd"
11
14
  echo " run=[${kubecmd}]"
12
15
 
13
16
  eval ${kubecmd}
package/src/klog CHANGED
@@ -3,11 +3,12 @@
3
3
  [ -f overwhelm.yaml ] && [ -f package.json ] && npm run ahoy
4
4
 
5
5
  DTS="`date +\"%Y%m%d-%H%M%S\"`"
6
+ PRETTY="pino-pretty -c -t 'HH:MM:ss.l'"
6
7
 
7
8
  if [ ! -z "$1" ];
8
9
  then
9
10
  NS=${2:-"default"}
10
- kubecmd="kubectl logs deployment/$1 --namespace $NS --follow=true --all-containers=true --since=10m | tee $1-$DTS.log | pino-pretty"
11
+ kubecmd="kubectl logs -f -n $NS -l app=$1 -c $1 | pino-pretty -c -t hh:mm:ss.l"
11
12
  echo " run=[$kubecmd]"
12
13
  eval ${kubecmd}
13
14
  exit $?
@@ -38,7 +39,7 @@ SLICED="${PODCHUNKS[@]:0:$CHOPLEN}"
38
39
  # message-processor
39
40
  CONTAINER=${SLICED// /-}
40
41
 
41
- kubecmd="kubectl logs --tail=50 --follow -c $CONTAINER --namespace $NAMESPACE $PODNAME | tee $CONTAINER-$DTS.log | pino-pretty"
42
+ kubecmd="kubectl logs --tail=50 --follow -c $CONTAINER --namespace $NAMESPACE $PODNAME | tee $CONTAINER-$DTS.log | $PRETTY"
42
43
  echo " run=[${kubecmd}]"
43
44
 
44
45
  eval ${kubecmd}