@opentermsarchive/engine 0.35.0 → 0.36.0

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": "@opentermsarchive/engine",
3
- "version": "0.35.0",
3
+ "version": "0.36.0",
4
4
  "description": "Tracks and makes visible changes to the terms of online services",
5
5
  "homepage": "https://github.com/OpenTermsArchive/engine#readme",
6
6
  "bugs": {
package/src/index.js CHANGED
@@ -38,8 +38,10 @@ export default async function track({ services, types, extractOnly, schedule })
38
38
  return;
39
39
  }
40
40
 
41
- if (process.env.NODE_ENV === 'production') {
41
+ if (process.env.SENDINBLUE_API_KEY) {
42
42
  archivist.attach(new Notifier(archivist.services));
43
+ } else {
44
+ logger.warn('Environment variable "SENDINBLUE_API_KEY" was not found; the Notifier module will be ignored');
43
45
  }
44
46
 
45
47
  if (process.env.GITHUB_TOKEN) {
@@ -49,8 +51,10 @@ export default async function track({ services, types, extractOnly, schedule })
49
51
  await reporter.initialize();
50
52
  archivist.attach(reporter);
51
53
  } else {
52
- logger.warn('Configuration key "reporter.githubIssues.repositories.declarations" was not found; the Reporter module will be ignored\n');
54
+ logger.warn('Configuration key "reporter.githubIssues.repositories.declarations" was not found; the Reporter module will be ignored');
53
55
  }
56
+ } else {
57
+ logger.warn('Environment variable "GITHUB_TOKEN" was not found; the Notifier module will be ignored');
54
58
  }
55
59
 
56
60
  if (!schedule) {
@@ -34,7 +34,7 @@ const consoleTransport = new winston.transports.Console();
34
34
 
35
35
  const transports = [consoleTransport];
36
36
 
37
- if (config.get('logger.sendMailOnError')) {
37
+ if (process.env.SMTP_PASSWORD && config.get('logger.sendMailOnError')) {
38
38
  const mailerOptions = {
39
39
  to: config.get('logger.sendMailOnError.to'),
40
40
  from: config.get('logger.sendMailOnError.from'),