@leverege/build-tools 2.39.0-beta.2 → 2.39.0-beta.3

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.39.0-beta.2",
3
+ "version": "2.39.0-beta.3",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -8,14 +8,8 @@
8
8
  "url": "git+ssh://git@bitbucket.org/leverege/build-tools.git"
9
9
  },
10
10
  "scripts": {
11
- "build": "npm run compile",
12
11
  "clean": "rm -rf lib",
13
- "compile": "npm run clean && npm run compile_server && npm run compile_web",
14
- "compile_server": "NODE_ENV=server babel -d lib/server src/",
15
- "compile_web": "NODE_ENV=web babel -d lib/web src/",
16
12
  "lint": "find ./src -name \\*.\\*js | xargs npx eslint --report-unused-disable-directives",
17
- "xprepublintOnly": "npm run lint && npm run build",
18
- "xprepublishOnly": "npm run compile",
19
13
  "test": "echo \"Error: no test specified\" && exit 1"
20
14
  },
21
15
  "bin": {
@@ -66,8 +66,7 @@ const refreshTokenOptions = [ // Use refreshTokenOptions to tie into the Usage s
66
66
  const sections = [
67
67
  {
68
68
  header : 'Leverege NPM Token Refresher',
69
- content : `{green
70
- This tool helps you retrieve an npmrc file stored in a secret within a GCP
69
+ content : `{green This tool helps you retrieve an npmrc file stored in a secret within a GCP
71
70
  Secret Manager. It enables NPM administrators to manage a single NPM token
72
71
  for use by a development team. The tool checks the age of your local ~/.npmrc
73
72
  file, and if it exceeds the specified --npmrc-age setting, it will fetch the
@@ -76,14 +75,48 @@ secret, overwriting the existing ~/.npmrc file.
76
75
  This tool may be invoked directly from the command line, or from scripts in
77
76
  the build-tools repository. For example, helmup will invoke this command for
78
77
  refreshing the token and to provide an audit log to slack when deployments
79
- are made.}
80
- `
78
+ are made.}`
81
79
  },
82
80
  { header : 'Options',
83
81
  optionList : refreshTokenOptions,
84
82
  },
83
+ {
84
+ header : 'Secret Manager Secrets (required)',
85
+ content : [
86
+ '{bold REFRESH_NPM_NPMRC} {green full npmrc file with a valid token}',
87
+ `{green ;;;;
88
+ ; lines that start with semi-colons are comments
89
+ ; run "npm help 7 config" for documentation of the various options
90
+ ;
91
+ ; expires on 11/20/23
92
+ //registry.npmjs.org/:_authToken=<a valid npm token goes here>
93
+ loglevel=error
94
+ progress=true
95
+
96
+ init.license=SEE LICENSE IN LICENSE.md
97
+ init.private=true
98
+
99
+ There may be times when a token is expired, lost or a new developer needs
100
+ to seed their ~/.npmrc file for the first time. Help a brother out and let
101
+ them know to run this command to fetch the current npmrc file:
102
+
103
+ gcloud secrets versions access latest \\
104
+ --secret=NPM_DEVELOPER_NPMRC \\
105
+ --project=leverege-registry > ~/.npmrc
106
+
107
+ Note, ^^that command will need a different --project name for non-leverege
108
+ developers.
109
+ }`,
110
+ `{bold REFRESH_NPM_SLACK_CONFIG} {green resembles the following JSON struct
111
+ \\{
112
+ "url" : "https://hooks.slack.com/services/T....H/Bx....1/44....gLr7",
113
+ "channel" : "#some-devops-channel"
114
+ \\} }`
115
+ ],
116
+ },
85
117
  { header : 'Environment Variables (optional)',
86
- content : '{bold REFRESH_NPM_PROJECT} {green may be used in lieu of --project}',
118
+ content : `{bold REFRESH_NPM_PROJECT} {green may be used in lieu of --project
119
+ }`,
87
120
  },
88
121
  ]
89
122