@leverege/build-tools 2.21.3 → 2.21.5

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.
@@ -64,17 +64,24 @@ const targets = Object.entries(firebasercContent.targets).reduce((prev, [project
64
64
  }, defaultTargets);
65
65
 
66
66
  if (!TARGET) {
67
- const {
68
- targetEnv
69
- } = await prompt({
70
- type: 'autocomplete',
71
- name: 'targetEnv',
72
- message: 'Which environment would you like to serve?',
73
- choices: Object.keys(targets).map(t => ({
74
- name: t,
75
- value: t
76
- }))
77
- });
67
+ const choices = Object.keys(targets).map(t => ({
68
+ name: t,
69
+ value: t
70
+ }));
71
+ let targetEnv;
72
+
73
+ if (choices.length > 1) {
74
+ const res = await prompt({
75
+ type: 'autocomplete',
76
+ name: 'targetEnv',
77
+ message: 'Which environment would you like to serve?',
78
+ choices
79
+ });
80
+ targetEnv = res.targetEnv;
81
+ } else {
82
+ targetEnv = choices[0].value;
83
+ }
84
+
78
85
  TARGET = targets[targetEnv];
79
86
  } else {
80
87
  TARGET = targets[TARGET];
@@ -64,17 +64,24 @@ const targets = Object.entries(firebasercContent.targets).reduce((prev, [project
64
64
  }, defaultTargets);
65
65
 
66
66
  if (!TARGET) {
67
- const {
68
- targetEnv
69
- } = await prompt({
70
- type: 'autocomplete',
71
- name: 'targetEnv',
72
- message: 'Which environment would you like to serve?',
73
- choices: Object.keys(targets).map(t => ({
74
- name: t,
75
- value: t
76
- }))
77
- });
67
+ const choices = Object.keys(targets).map(t => ({
68
+ name: t,
69
+ value: t
70
+ }));
71
+ let targetEnv;
72
+
73
+ if (choices.length > 1) {
74
+ const res = await prompt({
75
+ type: 'autocomplete',
76
+ name: 'targetEnv',
77
+ message: 'Which environment would you like to serve?',
78
+ choices
79
+ });
80
+ targetEnv = res.targetEnv;
81
+ } else {
82
+ targetEnv = choices[0].value;
83
+ }
84
+
78
85
  TARGET = targets[targetEnv];
79
86
  } else {
80
87
  TARGET = targets[TARGET];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.21.3",
3
+ "version": "2.21.5",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -53,7 +53,7 @@
53
53
  "command-line-args": "^5.2.1",
54
54
  "command-line-usage": "^6.1.3",
55
55
  "deepmerge": "^4.2.2",
56
- "dotenv": "^16.0.1",
56
+ "dotenv": "^16.0.2",
57
57
  "enquirer": "^2.3.6",
58
58
  "execa": "^5.1.1",
59
59
  "glob": "^8.0.3",
@@ -62,14 +62,14 @@
62
62
  "parse-gitignore": "^2.0.0",
63
63
  "readline-sync": "^1.4.10",
64
64
  "semver": "^7.3.7",
65
- "simple-git": "^3.13.0",
65
+ "simple-git": "^3.14.0",
66
66
  "zx": "^7.0.8"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@babel/cli": "^7.18.10",
70
- "@babel/core": "^7.18.13",
70
+ "@babel/core": "^7.19.1",
71
71
  "@leverege/babel-preset-leverege-node": "^2.0.0",
72
72
  "@leverege/eslint-config-leverege": "^3.0.1",
73
- "npm": "^8.18.0"
73
+ "npm": "^8.19.2"
74
74
  }
75
75
  }
@@ -72,12 +72,22 @@ const targets = Object
72
72
  }, defaultTargets )
73
73
 
74
74
  if ( !TARGET ) {
75
- const { targetEnv } = await prompt( {
76
- type : 'autocomplete',
77
- name : 'targetEnv',
78
- message : 'Which environment would you like to serve?',
79
- choices : Object.keys( targets ).map( t => ( { name : t, value : t } ) )
80
- } )
75
+ const choices = Object.keys( targets ).map( t => ( { name : t, value : t } ) )
76
+
77
+ let targetEnv
78
+
79
+ if ( choices.length > 1 ) {
80
+ const res = await prompt( {
81
+ type : 'autocomplete',
82
+ name : 'targetEnv',
83
+ message : 'Which environment would you like to serve?',
84
+ choices
85
+ } )
86
+
87
+ targetEnv = res.targetEnv
88
+ } else {
89
+ targetEnv = choices[0].value
90
+ }
81
91
 
82
92
  TARGET = targets[targetEnv]
83
93
  } else {
package/src/helmup CHANGED
@@ -307,8 +307,15 @@ SA_EXISTS
307
307
  ## Installing ES exporter
308
308
  helm upgrade --install elasticsearch-exporter prometheus-community/prometheus-elasticsearch-exporter \
309
309
  --namespace monitoring \
310
- --values elasticsearch-exporter/values-es-exporter.yaml \
311
- --version 4.13
310
+ --version 4.13 \
311
+ -f - <<ELASTIC_EXPORTER_CHART_MOD
312
+ service:
313
+ annotations:
314
+ prometheus.io/port: "9108"
315
+ prometheus.io/scrape: "true"
316
+ es:
317
+ uri: http://elasticsearch-master.default.svc.cluster.local:9200
318
+ ELASTIC_EXPORTER_CHART_MOD
312
319
 
313
320
  ## Install Grafana
314
321
  installGrafana
@@ -430,7 +437,7 @@ function installCronZombieKiller() {
430
437
  apiVersion: v1
431
438
  kind: ServiceAccount
432
439
  metadata:
433
- name: cronjob-sa
440
+ name: cron-zombie-sa
434
441
  namespace: default
435
442
  ---
436
443
  apiVersion: rbac.authorization.k8s.io/v1
@@ -450,7 +457,7 @@ metadata:
450
457
  namespace: default
451
458
  subjects:
452
459
  - kind: ServiceAccount
453
- name: cronjob-sa
460
+ name: cron-zombie-sa
454
461
  namespace: default
455
462
  roleRef:
456
463
  kind: Role
@@ -464,7 +471,7 @@ metadata:
464
471
  name: cron-zombie-killer
465
472
  spec:
466
473
  schedule: "*/4 * * * *"
467
- successfulJobsHistoryLimit: 0
474
+ successfulJobsHistoryLimit: 1
468
475
  jobTemplate:
469
476
  spec:
470
477
  template:
@@ -472,7 +479,7 @@ spec:
472
479
  name: cron-zombie-killer
473
480
  namespace: default
474
481
  spec:
475
- serviceAccountName: cronjob-sa
482
+ serviceAccountName: cron-zombie-sa
476
483
  restartPolicy: Never
477
484
  containers:
478
485
  - name: cron-zombie-killer
@@ -873,7 +880,7 @@ function doInstall() {
873
880
  checkSSDStorageClass
874
881
  addHelmRepo elastic https://helm.elastic.co
875
882
  helm upgrade --install elasticsearch elastic/elasticsearch \
876
- --version 7 \
883
+ --version 7.16 \
877
884
  --values $LOCAL_ES_VALUES \
878
885
  --set volumeClaimTemplate.storageClassName="ssd"
879
886
  removeHelmRepo elastic
Binary file
Binary file