@leverege/build-tools 2.39.2 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.39.2",
3
+ "version": "2.40.0-john.1",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -36,7 +36,7 @@
36
36
  "klog": "src/klog.sh",
37
37
  "npm-link": "src/npm-link.sh",
38
38
  "npm-unlink": "src/npm-unlink.sh",
39
- "overwhelm": "src/overwhelm.js",
39
+ "overwhelm": "src/overwhelm.mjs",
40
40
  "pkgck": "src/pkgck.sh",
41
41
  "pkglint": "src/pkglint.sh",
42
42
  "prune-git": "src/prune-git.sh",
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
- // eslint-disable-next-line no-console
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
- fetch( slackConfig.url, {
257
- method : 'POST',
258
- body : JSON.stringify( slackData ),
259
- headers : {
260
- 'Content-Type' : 'application/json',
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 ) {