@leverege/build-tools 2.39.3 → 2.40.0-john.1
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 +1 -1
- package/src/Utils.mjs +3 -2
- package/src/refresh-npm-token.mjs +12 -7
package/package.json
CHANGED
package/src/Utils.mjs
CHANGED
|
@@ -3,14 +3,15 @@ import { $ } from 'execa'
|
|
|
3
3
|
|
|
4
4
|
const debugEnabled = process.env.BUILD_TOOLS_DEBUG === '1'
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
/* eslint-disable no-console */
|
|
7
|
+
export const err = console.error
|
|
7
8
|
export const log = console.log
|
|
9
|
+
/* eslint-enable no-console */
|
|
8
10
|
export const debug = ( obj, text ) => {
|
|
9
11
|
if ( debugEnabled ) {
|
|
10
12
|
log( obj, `${chalk.yellow( '***DEBUG:' )} ${chalk.green( text )}` )
|
|
11
13
|
}
|
|
12
14
|
}
|
|
13
|
-
export const err = console.error
|
|
14
15
|
|
|
15
16
|
export const shellCmd = async ( cmdstr, opts = {} ) => {
|
|
16
17
|
try {
|
|
@@ -253,13 +253,18 @@ const slackData = {
|
|
|
253
253
|
if ( process.env.BUILD_TOOLS_DEBUG || args.dryRun ) {
|
|
254
254
|
log( { slackConfig, slackData }, '<==Slack skipped' )
|
|
255
255
|
} else {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
256
|
+
try {
|
|
257
|
+
const fetchStatus = await fetch( slackConfig.url, {
|
|
258
|
+
method : 'POST',
|
|
259
|
+
body : JSON.stringify( slackData ),
|
|
260
|
+
headers : {
|
|
261
|
+
'Content-Type' : 'application/json',
|
|
262
|
+
},
|
|
263
|
+
} )
|
|
264
|
+
log( { fetchStatus }, '<==Fetch completed' )//REMOVE ME
|
|
265
|
+
} catch ( fetchError ) {
|
|
266
|
+
log( { fetchError }, chalk.red( '\n\n***ERROR: fetch call failed\n' ) )
|
|
267
|
+
}
|
|
263
268
|
}
|
|
264
269
|
|
|
265
270
|
if ( npmrcRo.exists ) {
|