Skip to content

Commit

Permalink
#1043: improve CLI logs
Browse files Browse the repository at this point in the history
  • Loading branch information
JoernBerkefeld committed Jul 24, 2023
1 parent 1105608 commit 1767d48
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions lib/metadataTypes/Automation.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,17 @@ class Automation extends MetadataType {
}));
found++;
} else {
throw new TypeError(JSON.stringify(notificationsResult));
if (
Object.keys(notificationsResult).length !== 1 ||
!notificationsResult?.programId
) {
throw new TypeError(JSON.stringify(notificationsResult));
}
// * if there are no automation notifications, the API returns a single object with the programId
}
} catch (ex) {
Util.logger.debug(
` ☇ skipping Notifications for Automation ${automationLegacy.key}: ${ex.message} ${ex.code}`
` ☇ issue retrieving Notifications for automation ${automationLegacy.key}: ${ex.message} ${ex.code}`
);
skipped++;
}
Expand Down Expand Up @@ -397,14 +403,22 @@ class Automation extends MetadataType {
activity.activityObjectId == null
) {
Util.logger.debug(
` - skip parsing of activity due to missing activityObjectId: ${JSON.stringify(
activity
)}`
` - skipping ${
metadata[this.definition.keyField]
} activity ${stepNumber}.${
activity.displayOrder
} due to missing activityObjectId: ${JSON.stringify(activity)}`
);
// empty if block
} else if (!this.definition.dependencies.includes(activity.r__type)) {
Util.logger.debug(
` - skip parsing because the type is not set up as a dependecy for ${this.definition.type}`
` - skipping ${
metadata[this.definition.keyField]
} activity ${stepNumber}.${
activity.displayOrder
} because the type ${
activity.r__type
} is not set up as a dependency for ${this.definition.type}`
);
}
// / if managed by cache we can update references to support deployment
Expand Down

0 comments on commit 1767d48

Please sign in to comment.