@cumulus/message 14.0.0 → 15.0.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/workflows.js CHANGED
@@ -14,7 +14,7 @@ const errors_1 = require("@cumulus/errors");
14
14
  *
15
15
  * @alias module:workflows
16
16
  */
17
- const getMetaStatus = (message) => { var _a; return (_a = message.meta) === null || _a === void 0 ? void 0 : _a.status; };
17
+ const getMetaStatus = (message) => message.meta?.status;
18
18
  exports.getMetaStatus = getMetaStatus;
19
19
  /**
20
20
  * Get the workflow tasks in a workflow message, if any.
@@ -24,7 +24,7 @@ exports.getMetaStatus = getMetaStatus;
24
24
  *
25
25
  * @alias module:workflows
26
26
  */
27
- const getMessageWorkflowTasks = (message) => { var _a; return (_a = message.meta) === null || _a === void 0 ? void 0 : _a.workflow_tasks; };
27
+ const getMessageWorkflowTasks = (message) => message.meta?.workflow_tasks;
28
28
  exports.getMessageWorkflowTasks = getMessageWorkflowTasks;
29
29
  /**
30
30
  * Get the workflow start time, if any.
@@ -49,7 +49,7 @@ exports.getMessageWorkflowStartTime = getMessageWorkflowStartTime;
49
49
  *
50
50
  * @alias module:workflows
51
51
  */
52
- const getMessageWorkflowStopTime = (message) => { var _a; return (_a = message.cumulus_meta) === null || _a === void 0 ? void 0 : _a.workflow_stop_time; };
52
+ const getMessageWorkflowStopTime = (message) => message.cumulus_meta?.workflow_stop_time;
53
53
  exports.getMessageWorkflowStopTime = getMessageWorkflowStopTime;
54
54
  /**
55
55
  * Get the workflow name, if any.
@@ -59,7 +59,7 @@ exports.getMessageWorkflowStopTime = getMessageWorkflowStopTime;
59
59
  *
60
60
  * @alias module:workflows
61
61
  */
62
- const getMessageWorkflowName = (message) => { var _a; return (_a = message.meta) === null || _a === void 0 ? void 0 : _a.workflow_name; };
62
+ const getMessageWorkflowName = (message) => message.meta?.workflow_name;
63
63
  exports.getMessageWorkflowName = getMessageWorkflowName;
64
64
  /**
65
65
  * Get the workflow duration.
package/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