@cumulus/message 9.7.1 → 10.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/README.md CHANGED
@@ -31,86 +31,86 @@ from a Cumulus message</p>
31
31
  ### Functions
32
32
 
33
33
  <dl>
34
- <dt><a href="#exp_module_AsyncOperations--exports.getMessageAsyncOperationId">exports.getMessageAsyncOperationId(message)</a> ⇒ <code>undefined</code> | <code>string</code> ⏏</dt>
34
+ <dt><a href="#exp_module_AsyncOperations--getMessageAsyncOperationId">getMessageAsyncOperationId(message)</a> ⇒ <code>undefined</code> | <code>string</code> ⏏</dt>
35
35
  <dd><p>Get the async operation ID from a workflow message, if any.</p>
36
36
  </dd>
37
- <dt><a href="#exp_module_Collections--exports.constructCollectionId">exports.constructCollectionId(name, version)</a> ⇒ <code>string</code> ⏏</dt>
37
+ <dt><a href="#exp_module_Collections--constructCollectionId">constructCollectionId(name, version)</a> ⇒ <code>string</code> ⏏</dt>
38
38
  <dd><p>Returns the collection ID.</p>
39
39
  </dd>
40
40
  <dt><a href="#deconstructCollectionId">deconstructCollectionId(collectionId)</a> ⇒ <code>Object</code></dt>
41
41
  <dd><p>Returns the name and version of a collection based on
42
42
  the collectionId used in elasticsearch indexing</p>
43
43
  </dd>
44
- <dt><a href="#exp_module_Collections--exports.getCollectionNameAndVersionFromMessage">exports.getCollectionNameAndVersionFromMessage(message)</a> ⇒ <code>CollectionInfo</code> | <code>undefined</code> ⏏</dt>
44
+ <dt><a href="#exp_module_Collections--getCollectionNameAndVersionFromMessage">getCollectionNameAndVersionFromMessage(message)</a> ⇒ <code>CollectionInfo</code> | <code>undefined</code> ⏏</dt>
45
45
  <dd><p>Get collection name and version from execution message.</p>
46
46
  </dd>
47
- <dt><a href="#exp_module_Collections--exports.getCollectionIdFromMessage">exports.getCollectionIdFromMessage(message)</a> ⇒ <code>string</code> | <code>undefined</code> ⏏</dt>
47
+ <dt><a href="#exp_module_Collections--getCollectionIdFromMessage">getCollectionIdFromMessage(message)</a> ⇒ <code>string</code> | <code>undefined</code> ⏏</dt>
48
48
  <dd><p>Get collection ID from execution message.</p>
49
49
  </dd>
50
- <dt><a href="#exp_module_Granules--exports.getMessageGranules">exports.getMessageGranules(message)</a> ⇒ <code>Array.&lt;Object&gt;</code> | <code>undefined</code> ⏏</dt>
50
+ <dt><a href="#exp_module_Granules--getMessageGranules">getMessageGranules(message)</a> ⇒ <code>Array.&lt;Object&gt;</code> | <code>undefined</code> ⏏</dt>
51
51
  <dd><p>Get granules from payload?.granules of a workflow message.</p>
52
52
  </dd>
53
- <dt><a href="#exp_module_Granules--exports.messageHasGranules">exports.messageHasGranules(message)</a> ⇒ <code>boolean</code> ⏏</dt>
53
+ <dt><a href="#exp_module_Granules--messageHasGranules">messageHasGranules(message)</a> ⇒ <code>boolean</code> ⏏</dt>
54
54
  <dd><p>Determine if message has a granules object.</p>
55
55
  </dd>
56
- <dt><a href="#exp_module_Granules--exports.getGranuleStatus">exports.getGranuleStatus(workflowStatus, granule)</a> ⇒ <code>string</code> ⏏</dt>
56
+ <dt><a href="#exp_module_Granules--getGranuleStatus">getGranuleStatus(workflowStatus, granule)</a> ⇒ <code>string</code> ⏏</dt>
57
57
  <dd><p>Determine the status of a granule.</p>
58
58
  </dd>
59
- <dt><a href="#exp_module_Granules--exports.getGranuleQueryFields">exports.getGranuleQueryFields(message)</a> ⇒ <code>unknown</code> | <code>undefined</code> ⏏</dt>
59
+ <dt><a href="#exp_module_Granules--getGranuleQueryFields">getGranuleQueryFields(message)</a> ⇒ <code>unknown</code> | <code>undefined</code> ⏏</dt>
60
60
  <dd><p>Get the query fields of a granule, if any</p>
61
61
  </dd>
62
- <dt><a href="#exp_module_PDRs--exports.getMessagePdr">exports.getMessagePdr(message)</a> ⇒ <code>undefined</code> | <code>Object</code> ⏏</dt>
62
+ <dt><a href="#exp_module_PDRs--getMessagePdr">getMessagePdr(message)</a> ⇒ <code>undefined</code> | <code>Object</code> ⏏</dt>
63
63
  <dd><p>Get the PDR object from a workflow message, if any.</p>
64
64
  </dd>
65
- <dt><a href="#exp_module_PDRs--exports.messageHasPdr">exports.messageHasPdr(message)</a> ⇒ <code>boolean</code> ⏏</dt>
65
+ <dt><a href="#exp_module_PDRs--messageHasPdr">messageHasPdr(message)</a> ⇒ <code>boolean</code> ⏏</dt>
66
66
  <dd><p>Determine if message has a PDR.</p>
67
67
  </dd>
68
- <dt><a href="#exp_module_PDRs--exports.getMessagePdrPANSent">exports.getMessagePdrPANSent(message)</a> ⇒ <code>boolean</code> ⏏</dt>
68
+ <dt><a href="#exp_module_PDRs--getMessagePdrPANSent">getMessagePdrPANSent(message)</a> ⇒ <code>boolean</code> ⏏</dt>
69
69
  <dd><p>Get the PAN sent status from a workflow message, if any.</p>
70
70
  </dd>
71
- <dt><a href="#exp_module_PDRs--exports.getMessagePdrPANMessage">exports.getMessagePdrPANMessage(message)</a> ⇒ <code>string</code> ⏏</dt>
71
+ <dt><a href="#exp_module_PDRs--getMessagePdrPANMessage">getMessagePdrPANMessage(message)</a> ⇒ <code>string</code> ⏏</dt>
72
72
  <dd><p>Get the PAN message status from a workflow message, if any.</p>
73
73
  </dd>
74
- <dt><a href="#exp_module_PDRs--exports.getMessagePdrName">exports.getMessagePdrName(message)</a> ⇒ <code>string</code> ⏏</dt>
74
+ <dt><a href="#exp_module_PDRs--getMessagePdrName">getMessagePdrName(message)</a> ⇒ <code>string</code> ⏏</dt>
75
75
  <dd><p>Get the PDR name from a workflow message, if any.</p>
76
76
  </dd>
77
- <dt><a href="#exp_module_PDRs--exports.getMessagePdrRunningExecutions">exports.getMessagePdrRunningExecutions(message)</a> ⇒ <code>number</code> ⏏</dt>
77
+ <dt><a href="#exp_module_PDRs--getMessagePdrRunningExecutions">getMessagePdrRunningExecutions(message)</a> ⇒ <code>number</code> ⏏</dt>
78
78
  <dd><p>Get the number of running executions for a PDR, if any.</p>
79
79
  </dd>
80
- <dt><a href="#exp_module_PDRs--exports.getMessagePdrCompletedExecutions">exports.getMessagePdrCompletedExecutions(message)</a> ⇒ <code>number</code> ⏏</dt>
80
+ <dt><a href="#exp_module_PDRs--getMessagePdrCompletedExecutions">getMessagePdrCompletedExecutions(message)</a> ⇒ <code>number</code> ⏏</dt>
81
81
  <dd><p>Get the number of completed executions for a PDR, if any.</p>
82
82
  </dd>
83
- <dt><a href="#exp_module_PDRs--exports.getMessagePdrFailedExecutions">exports.getMessagePdrFailedExecutions(message)</a> ⇒ <code>number</code> ⏏</dt>
83
+ <dt><a href="#exp_module_PDRs--getMessagePdrFailedExecutions">getMessagePdrFailedExecutions(message)</a> ⇒ <code>number</code> ⏏</dt>
84
84
  <dd><p>Get the number of failed executions for a PDR, if any.</p>
85
85
  </dd>
86
- <dt><a href="#exp_module_PDRs--exports.getMessagePdrStats">exports.getMessagePdrStats(message)</a> ⇒ <code>PdrStats</code> ⏏</dt>
86
+ <dt><a href="#exp_module_PDRs--getMessagePdrStats">getMessagePdrStats(message)</a> ⇒ <code>PdrStats</code> ⏏</dt>
87
87
  <dd><p>Get the PDR stats from a workflow message, if any.</p>
88
88
  </dd>
89
- <dt><a href="#exp_module_PDRs--exports.getPdrPercentCompletion">exports.getPdrPercentCompletion(stats)</a> ⇒ <code>number</code> ⏏</dt>
89
+ <dt><a href="#exp_module_PDRs--getPdrPercentCompletion">getPdrPercentCompletion(stats)</a> ⇒ <code>number</code> ⏏</dt>
90
90
  <dd><p>Get the percent completion of PDR executions</p>
91
91
  </dd>
92
- <dt><a href="#exp_module_Providers--exports.getMessageProvider">exports.getMessageProvider(message)</a> ⇒ <code>MessageProvider</code> | <code>string</code> ⏏</dt>
92
+ <dt><a href="#exp_module_Providers--getMessageProvider">getMessageProvider(message)</a> ⇒ <code>MessageProvider</code> | <code>string</code> ⏏</dt>
93
93
  <dd><p>Get the provider from a workflow message, if any.</p>
94
94
  </dd>
95
- <dt><a href="#exp_module_Providers--exports.getMessageProviderId">exports.getMessageProviderId(message)</a> ⇒ <code>undefined</code> | <code>string</code> ⏏</dt>
95
+ <dt><a href="#exp_module_Providers--getMessageProviderId">getMessageProviderId(message)</a> ⇒ <code>undefined</code> | <code>string</code> ⏏</dt>
96
96
  <dd><p>Get the provider ID from a workflow message, if any.</p>
97
97
  </dd>
98
- <dt><a href="#exp_module_workflows--exports.getMetaStatus">exports.getMetaStatus(message)</a> ⇒ <code>Message.WorkflowStatus</code> | <code>undefined</code> ⏏</dt>
98
+ <dt><a href="#exp_module_workflows--getMetaStatus">getMetaStatus(message)</a> ⇒ <code>Message.WorkflowStatus</code> | <code>undefined</code> ⏏</dt>
99
99
  <dd><p>Get the status of a workflow message, if any.</p>
100
100
  </dd>
101
- <dt><a href="#exp_module_workflows--exports.getMessageWorkflowTasks">exports.getMessageWorkflowTasks(message)</a> ⇒ <code>Object</code> | <code>undefined</code> ⏏</dt>
101
+ <dt><a href="#exp_module_workflows--getMessageWorkflowTasks">getMessageWorkflowTasks(message)</a> ⇒ <code>Object</code> | <code>undefined</code> ⏏</dt>
102
102
  <dd><p>Get the workflow tasks in a workflow message, if any.</p>
103
103
  </dd>
104
- <dt><a href="#exp_module_workflows--exports.getMessageWorkflowStartTime">exports.getMessageWorkflowStartTime(message)</a> ⇒ <code>number</code> | <code>undefined</code> ⏏</dt>
104
+ <dt><a href="#exp_module_workflows--getMessageWorkflowStartTime">getMessageWorkflowStartTime(message)</a> ⇒ <code>number</code> | <code>undefined</code> ⏏</dt>
105
105
  <dd><p>Get the workflow start time, if any.</p>
106
106
  </dd>
107
- <dt><a href="#exp_module_workflows--exports.getMessageWorkflowStopTime">exports.getMessageWorkflowStopTime(message)</a> ⇒ <code>number</code> | <code>undefined</code> ⏏</dt>
107
+ <dt><a href="#exp_module_workflows--getMessageWorkflowStopTime">getMessageWorkflowStopTime(message)</a> ⇒ <code>number</code> | <code>undefined</code> ⏏</dt>
108
108
  <dd><p>Get the workflow stop time, if any.</p>
109
109
  </dd>
110
- <dt><a href="#exp_module_workflows--exports.getMessageWorkflowName">exports.getMessageWorkflowName(message)</a> ⇒ <code>string</code> | <code>undefined</code> ⏏</dt>
110
+ <dt><a href="#exp_module_workflows--getMessageWorkflowName">getMessageWorkflowName(message)</a> ⇒ <code>string</code> | <code>undefined</code> ⏏</dt>
111
111
  <dd><p>Get the workflow name, if any.</p>
112
112
  </dd>
113
- <dt><a href="#exp_module_workflows--exports.getWorkflowDuration">exports.getWorkflowDuration(startTime, [stopTime])</a> ⇒ <code>number</code> ⏏</dt>
113
+ <dt><a href="#exp_module_workflows--getWorkflowDuration">getWorkflowDuration(startTime, [stopTime])</a> ⇒ <code>number</code> ⏏</dt>
114
114
  <dd><p>Get the workflow duration.</p>
115
115
  </dd>
116
116
  </dl>
@@ -124,9 +124,9 @@ Utility functions for building Cumulus messages
124
124
  ```js
125
125
  const Build = require('@cumulus/message/Build');
126
126
  ```
127
- <a name="exp_module_Build--exports.buildQueueMessageFromTemplate"></a>
127
+ <a name="exp_module_Build--buildQueueMessageFromTemplate"></a>
128
128
 
129
- #### exports.buildQueueMessageFromTemplate(params) ⇒ <code>Message.CumulusMessage</code> ⏏
129
+ #### buildQueueMessageFromTemplate(params) ⇒ <code>Message.CumulusMessage</code> ⏏
130
130
  Build an SQS message from a workflow template for queueing executions.
131
131
 
132
132
  **Kind**: Exported function
@@ -158,20 +158,20 @@ const Executions = require('@cumulus/message/Executions');
158
158
  ```
159
159
 
160
160
  * [Executions](#module_Executions)
161
- * [exports.buildExecutionArn(stateMachineArn, executionName)](#exp_module_Executions--exports.buildExecutionArn) ⇒ <code>string</code> ⏏
162
- * [exports.getExecutionUrlFromArn(executionArn)](#exp_module_Executions--exports.getExecutionUrlFromArn) ⇒ <code>string</code> ⏏
163
- * [exports.getStateMachineArnFromExecutionArn(executionArn)](#exp_module_Executions--exports.getStateMachineArnFromExecutionArn) ⇒ <code>string</code> ⏏
164
- * [exports.getMessageExecutionName(message)](#exp_module_Executions--exports.getMessageExecutionName) ⇒ <code>string</code> ⏏
165
- * [exports.getMessageStateMachineArn(message)](#exp_module_Executions--exports.getMessageStateMachineArn) ⇒ <code>string</code> ⏏
166
- * [exports.getMessageExecutionArn(message)](#exp_module_Executions--exports.getMessageExecutionArn) ⇒ <code>null</code> \| <code>string</code> ⏏
167
- * [exports.getMessageExecutionParentArn(message)](#exp_module_Executions--exports.getMessageExecutionParentArn) ⇒ <code>undefined</code> \| <code>string</code> ⏏
168
- * [exports.getMessageCumulusVersion(message)](#exp_module_Executions--exports.getMessageCumulusVersion) ⇒ <code>undefined</code> \| <code>string</code> ⏏
169
- * [exports.getMessageExecutionOriginalPayload(message)](#exp_module_Executions--exports.getMessageExecutionOriginalPayload) ⇒ <code>unknown</code> \| <code>undefined</code> ⏏
170
- * [exports.getMessageExecutionFinalPayload(message)](#exp_module_Executions--exports.getMessageExecutionFinalPayload) ⇒ <code>unknown</code> \| <code>undefined</code> ⏏
171
-
172
- <a name="exp_module_Executions--exports.buildExecutionArn"></a>
173
-
174
- #### exports.buildExecutionArn(stateMachineArn, executionName) ⇒ <code>string</code> ⏏
161
+ * [buildExecutionArn(stateMachineArn, executionName)](#exp_module_Executions--buildExecutionArn) ⇒ <code>string</code> ⏏
162
+ * [getExecutionUrlFromArn(executionArn)](#exp_module_Executions--getExecutionUrlFromArn) ⇒ <code>string</code> ⏏
163
+ * [getStateMachineArnFromExecutionArn(executionArn)](#exp_module_Executions--getStateMachineArnFromExecutionArn) ⇒ <code>string</code> ⏏
164
+ * [getMessageExecutionName(message)](#exp_module_Executions--getMessageExecutionName) ⇒ <code>string</code> ⏏
165
+ * [getMessageStateMachineArn(message)](#exp_module_Executions--getMessageStateMachineArn) ⇒ <code>string</code> ⏏
166
+ * [getMessageExecutionArn(message)](#exp_module_Executions--getMessageExecutionArn) ⇒ <code>null</code> \| <code>string</code> ⏏
167
+ * [getMessageExecutionParentArn(message)](#exp_module_Executions--getMessageExecutionParentArn) ⇒ <code>undefined</code> \| <code>string</code> ⏏
168
+ * [getMessageCumulusVersion(message)](#exp_module_Executions--getMessageCumulusVersion) ⇒ <code>undefined</code> \| <code>string</code> ⏏
169
+ * [getMessageExecutionOriginalPayload(message)](#exp_module_Executions--getMessageExecutionOriginalPayload) ⇒ <code>unknown</code> \| <code>undefined</code> ⏏
170
+ * [getMessageExecutionFinalPayload(message)](#exp_module_Executions--getMessageExecutionFinalPayload) ⇒ <code>unknown</code> \| <code>undefined</code> ⏏
171
+
172
+ <a name="exp_module_Executions--buildExecutionArn"></a>
173
+
174
+ #### buildExecutionArn(stateMachineArn, executionName) ⇒ <code>string</code> ⏏
175
175
  Build execution ARN from a state machine ARN and execution name
176
176
 
177
177
  **Kind**: Exported function
@@ -182,9 +182,9 @@ Build execution ARN from a state machine ARN and execution name
182
182
  | stateMachineArn | <code>string</code> | state machine ARN |
183
183
  | executionName | <code>string</code> | state machine's execution name |
184
184
 
185
- <a name="exp_module_Executions--exports.getExecutionUrlFromArn"></a>
185
+ <a name="exp_module_Executions--getExecutionUrlFromArn"></a>
186
186
 
187
- #### exports.getExecutionUrlFromArn(executionArn) ⇒ <code>string</code> ⏏
187
+ #### getExecutionUrlFromArn(executionArn) ⇒ <code>string</code> ⏏
188
188
  Returns execution URL from an execution ARN.
189
189
 
190
190
  **Kind**: Exported function
@@ -194,9 +194,9 @@ Returns execution URL from an execution ARN.
194
194
  | --- | --- | --- |
195
195
  | executionArn | <code>string</code> | an execution ARN |
196
196
 
197
- <a name="exp_module_Executions--exports.getStateMachineArnFromExecutionArn"></a>
197
+ <a name="exp_module_Executions--getStateMachineArnFromExecutionArn"></a>
198
198
 
199
- #### exports.getStateMachineArnFromExecutionArn(executionArn) ⇒ <code>string</code> ⏏
199
+ #### getStateMachineArnFromExecutionArn(executionArn) ⇒ <code>string</code> ⏏
200
200
  Get state machine ARN from an execution ARN
201
201
 
202
202
  **Kind**: Exported function
@@ -206,9 +206,9 @@ Get state machine ARN from an execution ARN
206
206
  | --- | --- | --- |
207
207
  | executionArn | <code>string</code> | an execution ARN |
208
208
 
209
- <a name="exp_module_Executions--exports.getMessageExecutionName"></a>
209
+ <a name="exp_module_Executions--getMessageExecutionName"></a>
210
210
 
211
- #### exports.getMessageExecutionName(message) ⇒ <code>string</code> ⏏
211
+ #### getMessageExecutionName(message) ⇒ <code>string</code> ⏏
212
212
  Get the execution name from a workflow message.
213
213
 
214
214
  **Kind**: Exported function
@@ -222,9 +222,9 @@ Get the execution name from a workflow message.
222
222
  | --- | --- | --- |
223
223
  | message | <code>Message.CumulusMessage</code> | A workflow message object |
224
224
 
225
- <a name="exp_module_Executions--exports.getMessageStateMachineArn"></a>
225
+ <a name="exp_module_Executions--getMessageStateMachineArn"></a>
226
226
 
227
- #### exports.getMessageStateMachineArn(message) ⇒ <code>string</code> ⏏
227
+ #### getMessageStateMachineArn(message) ⇒ <code>string</code> ⏏
228
228
  Get the state machine ARN from a workflow message.
229
229
 
230
230
  **Kind**: Exported function
@@ -238,9 +238,9 @@ Get the state machine ARN from a workflow message.
238
238
  | --- | --- | --- |
239
239
  | message | <code>Message.CumulusMessage</code> | A workflow message object |
240
240
 
241
- <a name="exp_module_Executions--exports.getMessageExecutionArn"></a>
241
+ <a name="exp_module_Executions--getMessageExecutionArn"></a>
242
242
 
243
- #### exports.getMessageExecutionArn(message) ⇒ <code>null</code> \| <code>string</code> ⏏
243
+ #### getMessageExecutionArn(message) ⇒ <code>null</code> \| <code>string</code> ⏏
244
244
  Get the execution ARN from a workflow message.
245
245
 
246
246
  **Kind**: Exported function
@@ -250,9 +250,9 @@ Get the execution ARN from a workflow message.
250
250
  | --- | --- | --- |
251
251
  | message | <code>Message.CumulusMessage</code> | A workflow message object |
252
252
 
253
- <a name="exp_module_Executions--exports.getMessageExecutionParentArn"></a>
253
+ <a name="exp_module_Executions--getMessageExecutionParentArn"></a>
254
254
 
255
- #### exports.getMessageExecutionParentArn(message) ⇒ <code>undefined</code> \| <code>string</code> ⏏
255
+ #### getMessageExecutionParentArn(message) ⇒ <code>undefined</code> \| <code>string</code> ⏏
256
256
  Get the parent execution ARN from a workflow message, if any.
257
257
 
258
258
  **Kind**: Exported function
@@ -262,9 +262,9 @@ Get the parent execution ARN from a workflow message, if any.
262
262
  | --- | --- | --- |
263
263
  | message | <code>Message.CumulusMessage</code> | A workflow message object |
264
264
 
265
- <a name="exp_module_Executions--exports.getMessageCumulusVersion"></a>
265
+ <a name="exp_module_Executions--getMessageCumulusVersion"></a>
266
266
 
267
- #### exports.getMessageCumulusVersion(message) ⇒ <code>undefined</code> \| <code>string</code> ⏏
267
+ #### getMessageCumulusVersion(message) ⇒ <code>undefined</code> \| <code>string</code> ⏏
268
268
  Get the Cumulus version from a workflow message, if any.
269
269
 
270
270
  **Kind**: Exported function
@@ -274,9 +274,9 @@ Get the Cumulus version from a workflow message, if any.
274
274
  | --- | --- | --- |
275
275
  | message | <code>Message.CumulusMessage</code> | A workflow message object |
276
276
 
277
- <a name="exp_module_Executions--exports.getMessageExecutionOriginalPayload"></a>
277
+ <a name="exp_module_Executions--getMessageExecutionOriginalPayload"></a>
278
278
 
279
- #### exports.getMessageExecutionOriginalPayload(message) ⇒ <code>unknown</code> \| <code>undefined</code> ⏏
279
+ #### getMessageExecutionOriginalPayload(message) ⇒ <code>unknown</code> \| <code>undefined</code> ⏏
280
280
  Get the workflow original payload, if any.
281
281
 
282
282
  **Kind**: Exported function
@@ -286,9 +286,9 @@ Get the workflow original payload, if any.
286
286
  | --- | --- | --- |
287
287
  | message | <code>Message.CumulusMessage</code> | A workflow message object |
288
288
 
289
- <a name="exp_module_Executions--exports.getMessageExecutionFinalPayload"></a>
289
+ <a name="exp_module_Executions--getMessageExecutionFinalPayload"></a>
290
290
 
291
- #### exports.getMessageExecutionFinalPayload(message) ⇒ <code>unknown</code> \| <code>undefined</code> ⏏
291
+ #### getMessageExecutionFinalPayload(message) ⇒ <code>unknown</code> \| <code>undefined</code> ⏏
292
292
  Get the workflow final payload, if any.
293
293
 
294
294
  **Kind**: Exported function
@@ -309,13 +309,13 @@ const Queue = require('@cumulus/message/Queue');
309
309
  ```
310
310
 
311
311
  * [Queue](#module_Queue)
312
- * [exports.getQueueUrl(message)](#exp_module_Queue--exports.getQueueUrl) ⇒ <code>string</code> ⏏
313
- * [exports.getMaximumExecutions(message, queueUrl)](#exp_module_Queue--exports.getMaximumExecutions) ⇒ <code>number</code> ⏏
314
- * [exports.hasQueueAndExecutionLimit(message)](#exp_module_Queue--exports.hasQueueAndExecutionLimit) ⇒ <code>boolean</code> ⏏
312
+ * [getQueueUrl(message)](#exp_module_Queue--getQueueUrl) ⇒ <code>string</code> ⏏
313
+ * [getMaximumExecutions(message, queueUrl)](#exp_module_Queue--getMaximumExecutions) ⇒ <code>number</code> ⏏
314
+ * [hasQueueAndExecutionLimit(message)](#exp_module_Queue--hasQueueAndExecutionLimit) ⇒ <code>boolean</code> ⏏
315
315
 
316
- <a name="exp_module_Queue--exports.getQueueUrl"></a>
316
+ <a name="exp_module_Queue--getQueueUrl"></a>
317
317
 
318
- #### exports.getQueueUrl(message) ⇒ <code>string</code> ⏏
318
+ #### getQueueUrl(message) ⇒ <code>string</code> ⏏
319
319
  Get the queue URL from a workflow message.
320
320
 
321
321
  **Kind**: Exported function
@@ -325,9 +325,9 @@ Get the queue URL from a workflow message.
325
325
  | --- | --- | --- |
326
326
  | message | <code>MessageWithQueueInfo</code> | A workflow message object |
327
327
 
328
- <a name="exp_module_Queue--exports.getMaximumExecutions"></a>
328
+ <a name="exp_module_Queue--getMaximumExecutions"></a>
329
329
 
330
- #### exports.getMaximumExecutions(message, queueUrl) ⇒ <code>number</code> ⏏
330
+ #### getMaximumExecutions(message, queueUrl) ⇒ <code>number</code> ⏏
331
331
  Get the maximum executions for a queue.
332
332
 
333
333
  **Kind**: Exported function
@@ -342,9 +342,9 @@ Get the maximum executions for a queue.
342
342
  | message | <code>Message.CumulusMessage</code> | A workflow message object |
343
343
  | queueUrl | <code>string</code> | A queue URL |
344
344
 
345
- <a name="exp_module_Queue--exports.hasQueueAndExecutionLimit"></a>
345
+ <a name="exp_module_Queue--hasQueueAndExecutionLimit"></a>
346
346
 
347
- #### exports.hasQueueAndExecutionLimit(message) ⇒ <code>boolean</code> ⏏
347
+ #### hasQueueAndExecutionLimit(message) ⇒ <code>boolean</code> ⏏
348
348
  Determine if there is a queue and queue execution limit in the message.
349
349
 
350
350
  **Kind**: Exported function
@@ -365,12 +365,12 @@ const StepFunctions = require('@cumulus/message/StepFunctions');
365
365
  ```
366
366
 
367
367
  * [StepFunctions](#module_StepFunctions)
368
- * [exports.pullStepFunctionEvent(event)](#exp_module_StepFunctions--exports.pullStepFunctionEvent) ⇒ <code>Promise.&lt;Object&gt;</code> ⏏
369
- * [exports.parseStepMessage(stepMessage, stepName)](#exp_module_StepFunctions--exports.parseStepMessage) ⇒ <code>Promise.&lt;Object&gt;</code> ⏏
368
+ * [pullStepFunctionEvent(event)](#exp_module_StepFunctions--pullStepFunctionEvent) ⇒ <code>Promise.&lt;Object&gt;</code> ⏏
369
+ * [parseStepMessage(stepMessage, stepName)](#exp_module_StepFunctions--parseStepMessage) ⇒ <code>Promise.&lt;Object&gt;</code> ⏏
370
370
 
371
- <a name="exp_module_StepFunctions--exports.pullStepFunctionEvent"></a>
371
+ <a name="exp_module_StepFunctions--pullStepFunctionEvent"></a>
372
372
 
373
- #### exports.pullStepFunctionEvent(event) ⇒ <code>Promise.&lt;Object&gt;</code> ⏏
373
+ #### pullStepFunctionEvent(event) ⇒ <code>Promise.&lt;Object&gt;</code> ⏏
374
374
  Given a Step Function event, replace specified key in event with contents
375
375
  of S3 remote message
376
376
 
@@ -385,9 +385,9 @@ of S3 remote message
385
385
  | --- | --- | --- |
386
386
  | event | <code>Message.CumulusRemoteMessage</code> | Source event |
387
387
 
388
- <a name="exp_module_StepFunctions--exports.parseStepMessage"></a>
388
+ <a name="exp_module_StepFunctions--parseStepMessage"></a>
389
389
 
390
- #### exports.parseStepMessage(stepMessage, stepName) ⇒ <code>Promise.&lt;Object&gt;</code> ⏏
390
+ #### parseStepMessage(stepMessage, stepName) ⇒ <code>Promise.&lt;Object&gt;</code> ⏏
391
391
  Parse step message with CMA keys and replace specified key in event with contents
392
392
  of S3 remote message
393
393
 
@@ -1 +1 @@
1
- {"version":3,"file":"StepFunctions.d.ts","sourceRoot":"","sources":["src/StepFunctions.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAMzC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,UACzB;IACL,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,CAAA;CAChC,KACA,OAAO,CAAC,OAAO,CAyBjB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,gBACd,OAAO,CAAC,UAAU,YACrB,MAAM,oCAkBjB,CAAC"}
1
+ {"version":3,"file":"StepFunctions.d.ts","sourceRoot":"","sources":["src/StepFunctions.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAMzC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,UACzB;IACL,OAAO,CAAC,EAAE,QAAQ,aAAa,CAAA;CAChC,KACA,QAAQ,OAAO,CAyBjB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,gBACd,QAAQ,UAAU,YACrB,MAAM,oCAkBjB,CAAC"}
package/StepFunctions.js CHANGED
@@ -14,7 +14,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
14
14
  var __importStar = (this && this.__importStar) || function (mod) {
15
15
  if (mod && mod.__esModule) return mod;
16
16
  var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
18
  __setModuleDefault(result, mod);
19
19
  return result;
20
20
  };
@@ -47,13 +47,13 @@ const log = new logger_1.default({
47
47
  * @async
48
48
  * @alias module:StepFunctions
49
49
  */
50
- exports.pullStepFunctionEvent = async (event) => {
50
+ const pullStepFunctionEvent = async (event) => {
51
51
  if (!event.replace)
52
52
  return event;
53
53
  const remoteMsg = await s3Utils.getJsonS3Object(event.replace.Bucket, event.replace.Key);
54
54
  let returnEvent = remoteMsg;
55
55
  if (event.replace.TargetPath) {
56
- const replaceNodeSearch = jsonpath_plus_1.JSONPath({
56
+ const replaceNodeSearch = (0, jsonpath_plus_1.JSONPath)({
57
57
  path: event.replace.TargetPath,
58
58
  json: event,
59
59
  resultType: 'all',
@@ -69,6 +69,7 @@ exports.pullStepFunctionEvent = async (event) => {
69
69
  }
70
70
  return returnEvent;
71
71
  };
72
+ exports.pullStepFunctionEvent = pullStepFunctionEvent;
72
73
  /**
73
74
  * Parse step message with CMA keys and replace specified key in event with contents
74
75
  * of S3 remote message
@@ -80,7 +81,7 @@ exports.pullStepFunctionEvent = async (event) => {
80
81
  * @async
81
82
  * @alias module:StepFunctions
82
83
  */
83
- exports.parseStepMessage = async (stepMessage, stepName) => {
84
+ const parseStepMessage = async (stepMessage, stepName) => {
84
85
  let parsedMessage;
85
86
  if (stepMessage.cma) {
86
87
  const flattenedMessage = { ...stepMessage, ...stepMessage.cma, ...stepMessage.cma.event };
@@ -94,8 +95,9 @@ exports.parseStepMessage = async (stepMessage, stepName) => {
94
95
  if (parsedMessage.replace) {
95
96
  // Message was too large and output was written to S3
96
97
  log.info(`Retrieving ${stepName} output from ${JSON.stringify(parsedMessage.replace)}`);
97
- parsedMessage = await exports.pullStepFunctionEvent(parsedMessage);
98
+ parsedMessage = await (0, exports.pullStepFunctionEvent)(parsedMessage);
98
99
  }
99
100
  return parsedMessage;
100
101
  };
102
+ exports.parseStepMessage = parseStepMessage;
101
103
  //# sourceMappingURL=StepFunctions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StepFunctions.js","sourceRoot":"","sources":["src/StepFunctions.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;A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AG,MAAM,IAAA,6BAAqB,EAAC,aAAa,CAAC,CAAC;KAC5D;IACD,OAA+B,aAAa,CAAC;AAC/C,CAAC,CAAC;AApBW,QAAA,gBAAgB,oBAoB3B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cumulus/message",
3
- "version": "9.7.1",
3
+ "version": "10.0.0",
4
4
  "description": "Utilities for building and parsing Cumulus messages",
5
5
  "keywords": [
6
6
  "GIBS",
@@ -38,11 +38,11 @@
38
38
  "author": "Cumulus Authors",
39
39
  "license": "Apache-2.0",
40
40
  "dependencies": {
41
- "@cumulus/aws-client": "9.7.1",
42
- "@cumulus/common": "9.7.1",
43
- "@cumulus/errors": "9.7.1",
44
- "@cumulus/logger": "9.7.1",
45
- "@cumulus/types": "9.7.1",
41
+ "@cumulus/aws-client": "10.0.0",
42
+ "@cumulus/common": "10.0.0",
43
+ "@cumulus/errors": "10.0.0",
44
+ "@cumulus/logger": "10.0.0",
45
+ "@cumulus/types": "10.0.0",
46
46
  "jsonpath-plus": "^3.0.0",
47
47
  "lodash": "^4.17.20",
48
48
  "uuid": "^8.2.0"
@@ -50,5 +50,5 @@
50
50
  "devDependencies": {
51
51
  "@types/uuid": "^8.0.0"
52
52
  },
53
- "gitHead": "926740ad299b43f27117fd1fd34050b3db194c71"
53
+ "gitHead": "7c6d2d1cd79b57d6943bbc3d898d0cf975b543b1"
54
54
  }