@cumulus/message 21.2.0 → 21.3.1-alpha.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/.nycrc.json CHANGED
@@ -4,4 +4,4 @@
4
4
  "functions": 95.0,
5
5
  "branches": 87.0,
6
6
  "lines": 94.0
7
- }
7
+ }
package/README.md CHANGED
@@ -156,7 +156,7 @@ input.</p>
156
156
  ### Build
157
157
  Utility functions for building Cumulus messages
158
158
 
159
- **Example**
159
+ **Example**
160
160
  ```js
161
161
  const Build = require('@cumulus/message/Build');
162
162
  ```
@@ -165,8 +165,8 @@ const Build = require('@cumulus/message/Build');
165
165
  #### buildQueueMessageFromTemplate(params) ⇒ <code>Message.CumulusMessage</code> ⏏
166
166
  Build an SQS message from a workflow template for queueing executions.
167
167
 
168
- **Kind**: Exported function
169
- **Returns**: <code>Message.CumulusMessage</code> - A Cumulus message object
168
+ **Kind**: Exported function
169
+ **Returns**: <code>Message.CumulusMessage</code> - A Cumulus message object
170
170
 
171
171
  | Param | Type | Description |
172
172
  | --- | --- | --- |
@@ -188,7 +188,7 @@ Build an SQS message from a workflow template for queueing executions.
188
188
  Utility functions for generating execution information or parsing execution information
189
189
  from a Cumulus message
190
190
 
191
- **Example**
191
+ **Example**
192
192
  ```js
193
193
  const Executions = require('@cumulus/message/Executions');
194
194
  ```
@@ -213,8 +213,8 @@ const Executions = require('@cumulus/message/Executions');
213
213
  #### buildExecutionArn(stateMachineArn, executionName) ⇒ <code>string</code> ⏏
214
214
  Build execution ARN from a state machine ARN and execution name
215
215
 
216
- **Kind**: Exported function
217
- **Returns**: <code>string</code> - an execution ARN
216
+ **Kind**: Exported function
217
+ **Returns**: <code>string</code> - an execution ARN
218
218
 
219
219
  | Param | Type | Description |
220
220
  | --- | --- | --- |
@@ -226,8 +226,8 @@ Build execution ARN from a state machine ARN and execution name
226
226
  #### getExecutionUrlFromArn(executionArn) ⇒ <code>string</code> ⏏
227
227
  Returns execution URL from an execution ARN.
228
228
 
229
- **Kind**: Exported function
230
- **Returns**: <code>string</code> - returns AWS console URL for the execution
229
+ **Kind**: Exported function
230
+ **Returns**: <code>string</code> - returns AWS console URL for the execution
231
231
 
232
232
  | Param | Type | Description |
233
233
  | --- | --- | --- |
@@ -238,8 +238,8 @@ Returns execution URL from an execution ARN.
238
238
  #### getStateMachineArnFromExecutionArn(executionArn) ⇒ <code>string</code> ⏏
239
239
  Get state machine ARN from an execution ARN
240
240
 
241
- **Kind**: Exported function
242
- **Returns**: <code>string</code> - a state machine ARN
241
+ **Kind**: Exported function
242
+ **Returns**: <code>string</code> - a state machine ARN
243
243
 
244
244
  | Param | Type | Description |
245
245
  | --- | --- | --- |
@@ -250,8 +250,8 @@ Get state machine ARN from an execution ARN
250
250
  #### getMessageExecutionName(message) ⇒ <code>string</code> ⏏
251
251
  Get the execution name from a workflow message.
252
252
 
253
- **Kind**: Exported function
254
- **Returns**: <code>string</code> - An execution name
253
+ **Kind**: Exported function
254
+ **Returns**: <code>string</code> - An execution name
255
255
  **Throws**:
256
256
 
257
257
  - <code>Error</code> if there is no execution name
@@ -266,8 +266,8 @@ Get the execution name from a workflow message.
266
266
  #### getMessageStateMachineArn(message) ⇒ <code>string</code> ⏏
267
267
  Get the state machine ARN from a workflow message.
268
268
 
269
- **Kind**: Exported function
270
- **Returns**: <code>string</code> - A state machine ARN
269
+ **Kind**: Exported function
270
+ **Returns**: <code>string</code> - A state machine ARN
271
271
  **Throws**:
272
272
 
273
273
  - <code>Error</code> if there is not state machine ARN
@@ -282,8 +282,8 @@ Get the state machine ARN from a workflow message.
282
282
  #### getMessageExecutionArn(message) ⇒ <code>null</code> \| <code>string</code> ⏏
283
283
  Get the execution ARN from a workflow message.
284
284
 
285
- **Kind**: Exported function
286
- **Returns**: <code>null</code> \| <code>string</code> - A state machine execution ARN
285
+ **Kind**: Exported function
286
+ **Returns**: <code>null</code> \| <code>string</code> - A state machine execution ARN
287
287
 
288
288
  | Param | Type | Description |
289
289
  | --- | --- | --- |
@@ -294,8 +294,8 @@ Get the execution ARN from a workflow message.
294
294
  #### getMessageExecutionParentArn(message) ⇒ <code>undefined</code> \| <code>string</code> ⏏
295
295
  Get the parent execution ARN from a workflow message, if any.
296
296
 
297
- **Kind**: Exported function
298
- **Returns**: <code>undefined</code> \| <code>string</code> - A state machine execution ARN
297
+ **Kind**: Exported function
298
+ **Returns**: <code>undefined</code> \| <code>string</code> - A state machine execution ARN
299
299
 
300
300
  | Param | Type | Description |
301
301
  | --- | --- | --- |
@@ -306,8 +306,8 @@ Get the parent execution ARN from a workflow message, if any.
306
306
  #### getMessageCumulusVersion(message) ⇒ <code>undefined</code> \| <code>string</code> ⏏
307
307
  Get the Cumulus version from a workflow message, if any.
308
308
 
309
- **Kind**: Exported function
310
- **Returns**: <code>undefined</code> \| <code>string</code> - The cumulus version
309
+ **Kind**: Exported function
310
+ **Returns**: <code>undefined</code> \| <code>string</code> - The cumulus version
311
311
 
312
312
  | Param | Type | Description |
313
313
  | --- | --- | --- |
@@ -318,8 +318,8 @@ Get the Cumulus version from a workflow message, if any.
318
318
  #### getMessageExecutionOriginalPayload(message) ⇒ <code>unknown</code> \| <code>undefined</code> ⏏
319
319
  Get the workflow original payload, if any.
320
320
 
321
- **Kind**: Exported function
322
- **Returns**: <code>unknown</code> \| <code>undefined</code> - The workflow original payload
321
+ **Kind**: Exported function
322
+ **Returns**: <code>unknown</code> \| <code>undefined</code> - The workflow original payload
323
323
 
324
324
  | Param | Type | Description |
325
325
  | --- | --- | --- |
@@ -330,8 +330,8 @@ Get the workflow original payload, if any.
330
330
  #### getMessageExecutionFinalPayload(message) ⇒ <code>unknown</code> \| <code>undefined</code> ⏏
331
331
  Get the workflow final payload, if any.
332
332
 
333
- **Kind**: Exported function
334
- **Returns**: <code>unknown</code> \| <code>undefined</code> - The workflow final payload
333
+ **Kind**: Exported function
334
+ **Returns**: <code>unknown</code> \| <code>undefined</code> - The workflow final payload
335
335
 
336
336
  | Param | Type | Description |
337
337
  | --- | --- | --- |
@@ -342,8 +342,8 @@ Get the workflow final payload, if any.
342
342
  #### generateExecutionApiRecordFromMessage(message, [updatedAt]) ⇒ <code>ApiExecution</code> ⏏
343
343
  Generate an execution record for the API from the message.
344
344
 
345
- **Kind**: Exported function
346
- **Returns**: <code>ApiExecution</code> - An execution API record
345
+ **Kind**: Exported function
346
+ **Returns**: <code>ApiExecution</code> - An execution API record
347
347
 
348
348
  | Param | Type | Description |
349
349
  | --- | --- | --- |
@@ -355,8 +355,8 @@ Generate an execution record for the API from the message.
355
355
  #### generatePdrApiRecordFromMessage(message, [updatedAt]) ⇒ <code>ApiPdr</code> ⏏
356
356
  Generate a PDR record for the API from the message.
357
357
 
358
- **Kind**: global method of [<code>Executions</code>](#module_Executions)
359
- **Returns**: <code>ApiPdr</code> - An PDR API record
358
+ **Kind**: global method of [<code>Executions</code>](#module_Executions)
359
+ **Returns**: <code>ApiPdr</code> - An PDR API record
360
360
 
361
361
  | Param | Type | Description |
362
362
  | --- | --- | --- |
@@ -368,7 +368,7 @@ Generate a PDR record for the API from the message.
368
368
  ### Granules
369
369
  Utility functions for parsing granule information from a Cumulus message
370
370
 
371
- **Example**
371
+ **Example**
372
372
  ```js
373
373
  const Granules = require('@cumulus/message/Granules');
374
374
  ```
@@ -385,9 +385,9 @@ const Granules = require('@cumulus/message/Granules');
385
385
  #### getMessageGranules(message) ⇒ <code>Array.&lt;object&gt;</code> \| <code>undefined</code> ⏏
386
386
  Get granules from payload?.granules of a workflow message.
387
387
 
388
- **Kind**: Exported function
388
+ **Kind**: Exported function
389
389
  **Returns**: <code>Array.&lt;object&gt;</code> \| <code>undefined</code> - An array of granule objects, or
390
- undefined if `message.payload.granules` is not set
390
+ undefined if `message.payload.granules` is not set
391
391
 
392
392
  | Param | Type | Description |
393
393
  | --- | --- | --- |
@@ -398,8 +398,8 @@ Get granules from payload?.granules of a workflow message.
398
398
  #### messageHasGranules(message) ⇒ <code>boolean</code> ⏏
399
399
  Determine if message has a granules object.
400
400
 
401
- **Kind**: Exported function
402
- **Returns**: <code>boolean</code> - true if message has a granules object
401
+ **Kind**: Exported function
402
+ **Returns**: <code>boolean</code> - true if message has a granules object
403
403
 
404
404
  | Param | Type | Description |
405
405
  | --- | --- | --- |
@@ -410,8 +410,8 @@ Determine if message has a granules object.
410
410
  #### getGranuleStatus(workflowStatus, granule) ⇒ <code>string</code> ⏏
411
411
  Determine the status of a granule.
412
412
 
413
- **Kind**: Exported function
414
- **Returns**: <code>string</code> - The granule status
413
+ **Kind**: Exported function
414
+ **Returns**: <code>string</code> - The granule status
415
415
 
416
416
  | Param | Type | Description |
417
417
  | --- | --- | --- |
@@ -423,8 +423,8 @@ Determine the status of a granule.
423
423
  #### getGranuleQueryFields(message) ⇒ <code>unknown</code> \| <code>undefined</code> ⏏
424
424
  Get the query fields of a granule, if any
425
425
 
426
- **Kind**: Exported function
427
- **Returns**: <code>unknown</code> \| <code>undefined</code> - The granule query fields, if any
426
+ **Kind**: Exported function
427
+ **Returns**: <code>unknown</code> \| <code>undefined</code> - The granule query fields, if any
428
428
 
429
429
  | Param | Type | Description |
430
430
  | --- | --- | --- |
@@ -435,8 +435,8 @@ Get the query fields of a granule, if any
435
435
  #### generateGranuleApiRecord(message) ⇒ <code>Promise.&lt;ApiGranule&gt;</code> ⏏
436
436
  Generate an API granule record
437
437
 
438
- **Kind**: Exported function
439
- **Returns**: <code>Promise.&lt;ApiGranule&gt;</code> - The granule API record
438
+ **Kind**: Exported function
439
+ **Returns**: <code>Promise.&lt;ApiGranule&gt;</code> - The granule API record
440
440
 
441
441
  | Param | Type | Description |
442
442
  | --- | --- | --- |
@@ -447,7 +447,7 @@ Generate an API granule record
447
447
  ### Queue
448
448
  Utility functions for parsing queue information from a Cumulus message
449
449
 
450
- **Example**
450
+ **Example**
451
451
  ```js
452
452
  const Queue = require('@cumulus/message/Queue');
453
453
  ```
@@ -462,8 +462,8 @@ const Queue = require('@cumulus/message/Queue');
462
462
  #### getQueueUrl(message) ⇒ <code>string</code> ⏏
463
463
  Get the queue URL from a workflow message.
464
464
 
465
- **Kind**: Exported function
466
- **Returns**: <code>string</code> - A queue URL
465
+ **Kind**: Exported function
466
+ **Returns**: <code>string</code> - A queue URL
467
467
 
468
468
  | Param | Type | Description |
469
469
  | --- | --- | --- |
@@ -474,8 +474,8 @@ Get the queue URL from a workflow message.
474
474
  #### getMaximumExecutions(message, queueUrl) ⇒ <code>number</code> ⏏
475
475
  Get the maximum executions for a queue.
476
476
 
477
- **Kind**: Exported function
478
- **Returns**: <code>number</code> - Count of the maximum executions for the queue
477
+ **Kind**: Exported function
478
+ **Returns**: <code>number</code> - Count of the maximum executions for the queue
479
479
  **Throws**:
480
480
 
481
481
  - <code>Error</code> if no maximum executions can be found
@@ -491,8 +491,8 @@ Get the maximum executions for a queue.
491
491
  #### hasQueueAndExecutionLimit(message) ⇒ <code>boolean</code> ⏏
492
492
  Determine if there is a queue and queue execution limit in the message.
493
493
 
494
- **Kind**: Exported function
495
- **Returns**: <code>boolean</code> - True if there is a queue and execution limit.
494
+ **Kind**: Exported function
495
+ **Returns**: <code>boolean</code> - True if there is a queue and execution limit.
496
496
 
497
497
  | Param | Type | Description |
498
498
  | --- | --- | --- |
@@ -503,27 +503,27 @@ Determine if there is a queue and queue execution limit in the message.
503
503
  ### isCumulusMessageLike()
504
504
  Bare check for CumulusMessage Shape
505
505
 
506
- **Kind**: global function
506
+ **Kind**: global function
507
507
  <a name="isDLQRecordLike"></a>
508
508
 
509
509
  ### isDLQRecordLike()
510
510
  Bare check for SQS message Shape
511
511
 
512
- **Kind**: global function
512
+ **Kind**: global function
513
513
  <a name="unwrapDeadLetterCumulusMessage"></a>
514
514
 
515
515
  ### unwrapDeadLetterCumulusMessage()
516
516
  Unwrap dead letter Cumulus message, which may be wrapped in a
517
517
  States cloudwatch event, which is wrapped in an SQS message.
518
518
 
519
- **Kind**: global function
519
+ **Kind**: global function
520
520
  <a name="extractSQSMetadata"></a>
521
521
 
522
522
  ### extractSQSMetadata(message) ⇒
523
523
  peel out metadata from an SQS(/DLQ)record
524
524
 
525
- **Kind**: global function
526
- **Returns**: the given message without its body
525
+ **Kind**: global function
526
+ **Returns**: the given message without its body
527
527
 
528
528
  | Param | Description |
529
529
  | --- | --- |
@@ -534,7 +534,7 @@ peel out metadata from an SQS(/DLQ)record
534
534
  ### hoistCumulusMessageDetails()
535
535
  Reformat object with key attributes at top level.
536
536
 
537
- **Kind**: global function
537
+ **Kind**: global function
538
538
  <a name="getFailedStepName"></a>
539
539
 
540
540
  ### getFailedStepName(events, failedStepEvent) ⇒ <code>string</code>
@@ -542,8 +542,8 @@ Searches the Execution step History for the TaskStateEntered pertaining to
542
542
  the failed task Id. HistoryEvent ids are numbered sequentially, starting at
543
543
  one.
544
544
 
545
- **Kind**: global function
546
- **Returns**: <code>string</code> - name of the current stepfunction task or 'UnknownFailedStepName'.
545
+ **Kind**: global function
546
+ **Returns**: <code>string</code> - name of the current stepfunction task or 'UnknownFailedStepName'.
547
547
 
548
548
  | Param | Type | Description |
549
549
  | --- | --- | --- |
@@ -556,9 +556,9 @@ one.
556
556
  ### lastFailedEventStep(events) ⇒ <code>Array.&lt;HistoryEvent&gt;</code> \| <code>undefined</code>
557
557
  Finds all failed execution events and returns the last one in the list.
558
558
 
559
- **Kind**: global function
559
+ **Kind**: global function
560
560
  **Returns**: <code>Array.&lt;HistoryEvent&gt;</code> \| <code>undefined</code> - - the last lambda or activity that failed in the
561
- event array, or an empty array.
561
+ event array, or an empty array.
562
562
 
563
563
  | Param | Type | Description |
564
564
  | --- | --- | --- |
@@ -575,8 +575,8 @@ input.
575
575
 
576
576
  Falls back to overall execution input.
577
577
 
578
- **Kind**: global function
579
- **Returns**: <code>Object</code> - - CumulusMessage Execution step message or execution input message
578
+ **Kind**: global function
579
+ **Returns**: <code>Object</code> - - CumulusMessage Execution step message or execution input message
580
580
 
581
581
  | Param | Type | Description |
582
582
  | --- | --- | --- |
@@ -588,8 +588,8 @@ Falls back to overall execution input.
588
588
  ### isFileExtensionMatched(granuleFile, extension) ⇒ <code>boolean</code>
589
589
  Check if the file has the extension
590
590
 
591
- **Kind**: global function
592
- **Returns**: <code>boolean</code> - whether the file has the extension
591
+ **Kind**: global function
592
+ **Returns**: <code>boolean</code> - whether the file has the extension
593
593
 
594
594
  | Param | Type | Description |
595
595
  | --- | --- | --- |
@@ -601,8 +601,8 @@ Check if the file has the extension
601
601
  ### parseException(exception) ⇒ <code>string</code>
602
602
  Ensures that the exception is returned as an object
603
603
 
604
- **Kind**: global function
605
- **Returns**: <code>string</code> - an stringified exception
604
+ **Kind**: global function
605
+ **Returns**: <code>string</code> - an stringified exception
606
606
 
607
607
  | Param | Type | Description |
608
608
  | --- | --- | --- |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cumulus/message",
3
- "version": "21.2.0",
3
+ "version": "21.3.1-alpha.0",
4
4
  "description": "Utilities for building and parsing Cumulus messages",
5
5
  "keywords": [
6
6
  "GIBS",
@@ -8,7 +8,7 @@
8
8
  "NASA"
9
9
  ],
10
10
  "engines": {
11
- "node": ">=20.12.2"
11
+ "node": ">=22.21.1"
12
12
  },
13
13
  "publishConfig": {
14
14
  "access": "public"
@@ -41,11 +41,11 @@
41
41
  "author": "Cumulus Authors",
42
42
  "license": "Apache-2.0",
43
43
  "dependencies": {
44
- "@cumulus/aws-client": "21.2.0",
45
- "@cumulus/common": "21.2.0",
46
- "@cumulus/errors": "21.2.0",
47
- "@cumulus/logger": "21.2.0",
48
- "@cumulus/types": "21.2.0",
44
+ "@cumulus/aws-client": "21.3.1-alpha.0",
45
+ "@cumulus/common": "21.3.1-alpha.0",
46
+ "@cumulus/errors": "21.3.1-alpha.0",
47
+ "@cumulus/logger": "21.3.1-alpha.0",
48
+ "@cumulus/types": "21.3.1-alpha.0",
49
49
  "jsonpath-plus": "^10.0.0",
50
50
  "lodash": "^4.17.21",
51
51
  "uuidv4": "^6.2.13"
@@ -53,5 +53,5 @@
53
53
  "devDependencies": {
54
54
  "@types/uuid": "^8.0.0"
55
55
  },
56
- "gitHead": "696befd260527f74a8a5bfb92f9511b455a23388"
56
+ "gitHead": "5be3f53f3646008d95e1e8d0a0740301c9c19fcd"
57
57
  }