@leverege/build-tools 2.5.8 → 2.5.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/lib/server/repo-init/config.tgz +0 -0
- package/package.json +9 -9
- package/src/helmup +12 -1
- package/src/klog +34 -0
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leverege/build-tools",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.10",
|
|
4
4
|
"description": "A collection of build / support tools for Leverege developers",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"helminit-dp": "src/helminit-dp",
|
|
34
34
|
"helminit-scaler": "src/helminit-scaler",
|
|
35
35
|
"helmup": "src/helmup",
|
|
36
|
-
"husky-check": "src/husky-check.js",
|
|
37
36
|
"k8scale": "src/k8scale",
|
|
38
37
|
"k8x": "src/k8x",
|
|
38
|
+
"klog": "src/klog",
|
|
39
39
|
"npm-link": "src/npm-link",
|
|
40
40
|
"npm-unlink": "src/npm-unlink",
|
|
41
41
|
"overwhelm": "src/overwhelm.js",
|
|
@@ -53,30 +53,30 @@
|
|
|
53
53
|
"clear": "^0.1.0",
|
|
54
54
|
"clipboardy": "^2.3.0",
|
|
55
55
|
"command-line-args": "^5.1.1",
|
|
56
|
-
"command-line-usage": "^6.1.
|
|
56
|
+
"command-line-usage": "^6.1.1",
|
|
57
57
|
"dotenv": "^8.2.0",
|
|
58
|
-
"execa": "^4.0
|
|
58
|
+
"execa": "^4.1.0",
|
|
59
59
|
"figlet": "^1.5.0",
|
|
60
60
|
"git-branch": "^2.0.1",
|
|
61
61
|
"glob": "^7.1.6",
|
|
62
62
|
"inquirer": "^7.3.3",
|
|
63
63
|
"js-yaml": "^3.14.0",
|
|
64
64
|
"ncp": "^2.0.0",
|
|
65
|
-
"npm-check-updates": "^
|
|
66
|
-
"npm-registry-fetch": "^
|
|
65
|
+
"npm-check-updates": "^10.2.1",
|
|
66
|
+
"npm-registry-fetch": "^9.0.0",
|
|
67
67
|
"open": "^7.3.0",
|
|
68
68
|
"ora": "^5.1.0",
|
|
69
69
|
"parse-gitignore": "^1.0.1",
|
|
70
70
|
"readline-sync": "^1.4.10",
|
|
71
71
|
"semver": "^7.3.2",
|
|
72
|
-
"simple-git": "^2.
|
|
72
|
+
"simple-git": "^2.23.0"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@babel/cli": "^7.12.1",
|
|
76
76
|
"@babel/core": "^7.12.3",
|
|
77
|
-
"@babel/node": "^7.12.
|
|
77
|
+
"@babel/node": "^7.12.6",
|
|
78
78
|
"@leverege/babel-preset-leverege-node": "^1.1.1",
|
|
79
|
-
"@leverege/eslint-config-leverege": "^2.
|
|
79
|
+
"@leverege/eslint-config-leverege": "^2.2.0",
|
|
80
80
|
"npm": "^6.14.8"
|
|
81
81
|
}
|
|
82
82
|
}
|
package/src/helmup
CHANGED
|
@@ -388,7 +388,18 @@ helm repo update &> /dev/null # && helm search leverege
|
|
|
388
388
|
# of the standard setup scripts.
|
|
389
389
|
function ifPluggedIn() {
|
|
390
390
|
PLUGIN="$1/helmup.plugin"
|
|
391
|
-
[ ! -
|
|
391
|
+
[ ! -f $PLUGIN ] && return 1
|
|
392
|
+
|
|
393
|
+
if [ ! -x $PLUGIN ];
|
|
394
|
+
then
|
|
395
|
+
cat<<PLUGIN_NOEXEC
|
|
396
|
+
$RED_ERROR The plugin file is preset but is not executable.
|
|
397
|
+
Try running => `color y "chmod +x $PLUGIN"`
|
|
398
|
+
|
|
399
|
+
PLUGIN_NOEXEC
|
|
400
|
+
exit 1
|
|
401
|
+
fi
|
|
402
|
+
|
|
392
403
|
printf "\n***Executing local plugin code => `color y $PLUGIN`\n\n" && sleep 2
|
|
393
404
|
. $PLUGIN # executing with . allows the plugin to use functions like color
|
|
394
405
|
return 0
|
package/src/klog
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
[ -f overwhelm.yaml ] && [ -f package.json ] && npm run ahoy
|
|
4
|
+
|
|
5
|
+
[ ! -x "$(command -v fzf)" ] && printf "\n***ERROR: Missing fzf fuzzy matcher => brew install fzf\n\n" && exit 1
|
|
6
|
+
|
|
7
|
+
# Pipes the output from kubectl into the fuzzy matcher which will yield:
|
|
8
|
+
# default message-processor-6b48cf68c6-8zblz 1/1 Running etc...
|
|
9
|
+
KUBEOUT=$(kubectl get pods --all-namespaces -owide | fzf | awk '{print $1, $2}')
|
|
10
|
+
|
|
11
|
+
# split the namespace and full pod name from a string which will yield:
|
|
12
|
+
# default message-processor-6b48cf68c6-8zblz
|
|
13
|
+
IFS=" " read NAMESPACE PODNAME <<< "$KUBEOUT" && unset IFS
|
|
14
|
+
|
|
15
|
+
# splits the full pod name on dashes which will yield an array of:
|
|
16
|
+
# message processor 6b48cf68c6 8zblz
|
|
17
|
+
IFS=- read -a PODCHUNKS <<< "$PODNAME"
|
|
18
|
+
|
|
19
|
+
# the chop length is the array length minus 2 to lop off the last two elements
|
|
20
|
+
CHOPLEN="${#PODCHUNKS[@]}-2"
|
|
21
|
+
|
|
22
|
+
# slice the array by lopping off the last two elements in the array yielding:
|
|
23
|
+
# message processor
|
|
24
|
+
SLICED="${PODCHUNKS[@]:0:$CHOPLEN}"
|
|
25
|
+
|
|
26
|
+
# keep in mind the slice above yields a string, so now we replace the spaces:
|
|
27
|
+
# message-processor
|
|
28
|
+
CONTAINER=${SLICED// /-}
|
|
29
|
+
DTS="`date +\"%Y%m%d-%H%M%S\"`"
|
|
30
|
+
|
|
31
|
+
kubecmd="kubectl logs --tail=50 --follow -c $CONTAINER --namespace $NAMESPACE $PODNAME | tee $CONTAINER-$DTS.log | pino-pretty"
|
|
32
|
+
echo " run=[${kubecmd}]"
|
|
33
|
+
|
|
34
|
+
eval ${kubecmd}
|