@leverege/build-tools 2.48.3 → 2.48.4

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.48.3",
3
+ "version": "2.48.4",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -125,9 +125,10 @@ debug( {
125
125
  // Get the current access token and use it to login to the registry with helm.
126
126
  try {
127
127
  const accessToken = await shellCmd( 'gcloud auth print-access-token' )
128
- const registryLoginCommand = `echo ${accessToken} | helm registry login --username oauth2accesstoken --password-stdin`
128
+ // -p is frowned upon but using a pipe | is problematic with shellCmd (execa)
129
+ const registryLoginCommand = `helm registry login -u oauth2accesstoken -p ${accessToken}`
129
130
 
130
- const loginResult = await shellCmd( `${registryLoginCommand} https://${registryLocation}` ) // TODO: cmd line param
131
+ const loginResult = await shellCmd( `${registryLoginCommand} https://${registryLocation}` )
131
132
  debug( { loginResult }, '<==registryLogin' )
132
133
  } catch ( error ) {
133
134
  errorExit( error )
@@ -1,81 +0,0 @@
1
- #!/usr/bin/env node
2
- /*
3
- * chart-to-registry will...
4
- */
5
- import { existsSync, rmSync } from 'node:fs'
6
-
7
- import chalk from 'chalk'
8
- import commandLineArgs from 'command-line-args'
9
- import commandLineUsage from 'command-line-usage'
10
- import { lt as semverLt } from 'semver'
11
-
12
- import {
13
- debug,
14
- errorExit,
15
- log,
16
- getGitRootDirectory,
17
- parsePackageJson,
18
- parseHelmChart,
19
- shellCmd } from './Utils.mjs'
20
-
21
- const commandLineOptions = [ // Use commandLineOptions to tie into the Usage statements
22
- /* eslint-disable max-len */
23
- {
24
- name : 'location',
25
- type : String,
26
- defaultValue : 'us-docker.pkg.dev',
27
- description : '{green the location of the artifact registry the chart will be pushed to (default us-docker.pkg.dev)}',
28
- },
29
- {
30
- name : 'project',
31
- type : String,
32
- defaultValue : process.env.HELM_CHART_REGISTRY || 'leverege-registry',
33
- description : '{green the name of the google project containing the npmrc and slack config secrets (default leverege-registry)}',
34
- },
35
- {
36
- name : 'repository',
37
- type : String,
38
- description : '{green the target repository to receive the pushed chart}',
39
- },
40
- {
41
- name : 'help',
42
- type : Boolean,
43
- description : '{green display this help screen}',
44
- },
45
- /* eslint-enable max-len */
46
- ]
47
-
48
- const sections = [
49
- {
50
- header : 'Leverege Helm Chart Location Tool',
51
- content : `{green A tool for locating helm charts in registries. It was created to allow
52
- the helmup.sh bash script to easily locate charts, which may be in the
53
- chart museum, La everge artifact-registry project or a 3rd party
54
- developer\'s artifact-registry.}`
55
- },
56
- { header : 'Options',
57
- optionList : commandLineOptions,
58
- },
59
- ]
60
-
61
- const args = commandLineArgs( commandLineOptions, { camelCase : true, partial : true } )
62
- const usage = commandLineUsage( sections )
63
-
64
- if ( args.help ) {
65
- log( usage )
66
- process.exit( 0 )
67
- }
68
-
69
- /* eslint-disable no-underscore-dangle */
70
- if ( args._unknown ) {
71
- log( usage )
72
- log( `\nUnrecognized argument [${chalk.bold.red( args._unknown )}]\n` )
73
- process.exit( 1 )
74
- }
75
- /* eslint-enable no-underscore-dangle */
76
-
77
- const minNodejsVersion = '18.0.0'
78
- if ( semverLt( process.version, minNodejsVersion ) ) {
79
- errorExit( `\n***ERROR: must be running at least node ${minNodejsVersion}\n` )
80
- }
81
-