@leverege/build-tools 2.50.14 → 2.50.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.50.14",
3
+ "version": "2.50.16",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -61,20 +61,20 @@
61
61
  "command-line-usage": "^7.0.1",
62
62
  "deepmerge": "^4.3.1",
63
63
  "enquirer": "^2.4.1",
64
- "execa": "^9.1.0",
65
- "glob": "^10.4.1",
64
+ "execa": "^9.2.0",
65
+ "glob": "^10.4.2",
66
66
  "handlebars": "^4.7.8",
67
67
  "inquirer": "^9.2.23",
68
68
  "js-yaml": "^4.1.0",
69
69
  "ms": "^2.1.3",
70
- "npm-registry-fetch": "^17.0.1",
70
+ "npm-registry-fetch": "^17.1.0",
71
71
  "package-up": "^5.0.0",
72
72
  "parse-gitignore": "^2.0.0",
73
73
  "read-pkg": "^9.0.1",
74
74
  "readline-sync": "^1.4.10",
75
75
  "semver": "^7.6.2",
76
- "simple-git": "^3.24.0",
77
- "zx": "^8.1.2"
76
+ "simple-git": "^3.25.0",
77
+ "zx": "^8.1.3"
78
78
  },
79
79
  "devDependencies": {
80
80
  "@leverege/eslint-config-leverege": "^4.2.0",
package/src/Utils.mjs CHANGED
@@ -7,7 +7,9 @@ import { glob } from 'glob'
7
7
  import { packageUp } from 'package-up'
8
8
  import YAML from 'js-yaml'
9
9
 
10
- const debugEnabled = process.env.BUILD_TOOLS_DEBUG === '1'
10
+ let debugEnabled = process.env.BUILD_TOOLS_DEBUG === '1'
11
+
12
+ export const disableDebug = () => debugEnabled = false
11
13
 
12
14
  /* eslint-disable no-console */
13
15
  export const err = console.error
package/src/bash-funcs CHANGED
@@ -29,8 +29,12 @@ RED_ERROR=`color r '***ERROR:'`
29
29
  YELO_WARN="`color y '***WARNING:'`"
30
30
  GREEN_INFO=`color g '***INFO:'`
31
31
 
32
+ function clearScreen() {
33
+ [ "$BUILD_TOOLS_DEBUG" != "1" ] && clear
34
+ }
35
+
32
36
  function clearlyWarn() {
33
- [ -z "$1" ] && clear
37
+ clearScreen
34
38
  cat<<CLEARWARN
35
39
 
36
40
  `color y '*** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING ***'`
@@ -4,7 +4,7 @@ showInstalling "Grafana"
4
4
 
5
5
  addHelmRepo grafana https://grafana.github.io/helm-charts
6
6
 
7
- [ -z "$GRAFANA_CHART_VERSION" ] && GRAFANA_CHART_VERSION="7"
7
+ [ -z "$GRAFANA_CHART_VERSION" ] && GRAFANA_CHART_VERSION="8"
8
8
  helm upgrade --install grafana grafana/grafana \
9
9
  --namespace monitoring --create-namespace \
10
10
  --values grafana/grafana-local.yaml \
@@ -4,7 +4,7 @@ showInstalling "Redis"
4
4
 
5
5
  OCI_CHART="oci://registry-1.docker.io/bitnamicharts/redis"
6
6
 
7
- [ -z "$REDIS_CHART_VERSION" ] && REDIS_CHART_VERSION="19.5.0"
7
+ [ -z "$REDIS_CHART_VERSION" ] && REDIS_CHART_VERSION="19.5.4"
8
8
 
9
9
  helm upgrade --install redis $OCI_CHART \
10
10
  --values redis/redis-local.yaml \
package/src/overwhelm.mjs CHANGED
@@ -15,7 +15,7 @@ import parse from 'parse-gitignore'
15
15
  import ask from 'readline-sync'
16
16
  import YAML from 'js-yaml'
17
17
 
18
- import { debug, err, log, shellCmd } from './Utils.mjs'
18
+ import { debug, disableDebug, err, log, shellCmd } from './Utils.mjs'
19
19
 
20
20
  const optionsDefinitions = [
21
21
  /* eslint-disable no-multi-spaces */
@@ -33,6 +33,9 @@ const optionsDefinitions = [
33
33
  ]
34
34
  const args = cliArgs( optionsDefinitions )
35
35
 
36
+ // when using --key we only want the key contents w/o debug info
37
+ if ( args.key ) { disableDebug() }
38
+
36
39
  // See if we are in a monorepo, which changes some of the rules.
37
40
  const gitTop = await shellCmd( 'git rev-parse --show-toplevel' )
38
41
 
@@ -74,6 +77,13 @@ if ( fs.existsSync( 'values-default.yaml' ) ) {
74
77
  }
75
78
  }
76
79
 
80
+ // Avoid race condition when running overwhelm for the first time on a new
81
+ // cluster and the default-configs.yaml file has yet to be created.
82
+ const defaultConfigs = 'default-configs.yaml'
83
+ if ( !fs.existsSync( defaultConfigs ) ) {
84
+ fs.closeSync( fs.openSync( defaultConfigs, 'w' ) ) // same as unix touch
85
+ }
86
+
77
87
  // Load the default values and then overlay with the project specific yaml
78
88
  // values. This supports the notion of this type of approach in the
79
89
  // overwhelm yaml settings:
@@ -201,7 +211,7 @@ const doReplacements = ( yamls, replacements ) => {
201
211
 
202
212
  // Collect all of the yaml from the yams...
203
213
  const buildYaml = ( yamls, replacements ) => {
204
- const always = [ 'default-configs.yaml' ]
214
+ const always = [ defaultConfigs ]
205
215
  const values = [ ...always, ...yamls ]
206
216
  const loaded = []
207
217
  let allYamls = ''