eip-cloud-services 1.0.5 → 1.0.7

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": "eip-cloud-services",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Houses a collection of helpers for connecting with Cloud services.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/cdn.js CHANGED
@@ -3,7 +3,8 @@ const { GoogleAuth } = require ( 'google-auth-library' );
3
3
  const { initialiseGoogleAuth } = require ( './gcp' );
4
4
  const config = require ( 'config' );
5
5
  const packageJson = require ( '../package.json' );
6
- const log = config.cdn.logFunction ? require ( config.cdn.logFunction ) : console.log;
6
+ const { cwd } = require ( 'process' );
7
+ const { log } = config.s3.logsFunction ? require ( `${ cwd ()}/${config.s3.logsFunction}` ) : console;
7
8
 
8
9
  /**
9
10
  * Create a CDN invalidation for the specified key(s) and environment.
package/src/s3.js CHANGED
@@ -42,8 +42,8 @@ const { S3Client, HeadObjectCommand, GetObjectCommand, PutObjectCommand, DeleteO
42
42
  const config = require ( 'config' );
43
43
  const zlib = require ( 'zlib' );
44
44
  const crypto = require ( 'crypto' );
45
- const log = config.s3.logFunction ? require ( config.s3.logFunction ) : console.log;
46
-
45
+ const { cwd } = require ( 'process' );
46
+ const { log } = config.s3.logsFunction ? require ( `${ cwd ()}/${config.s3.logsFunction}` ) : console;
47
47
  const S3 = new S3Client ( { region: 'eu-west-1' } );
48
48
 
49
49
  /**
package/src/util/log.js CHANGED
@@ -1,3 +1,3 @@
1
- exports.log = args => {
2
- console.log ( args );
1
+ exports.log = log => {
2
+ console.log ( log );
3
3
  };