@cumulus/message 11.1.1 → 13.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/Granules.d.ts +1 -1
- package/Granules.d.ts.map +1 -1
- package/README.md +16 -0
- package/package.json +8 -8
- package/src/utils.ts +13 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/utils.d.ts +9 -0
- package/utils.d.ts.map +1 -1
- package/utils.js +13 -1
- package/utils.js.map +1 -1
- package/workflows.d.ts +1 -1
- package/workflows.d.ts.map +1 -1
package/Granules.d.ts
CHANGED
|
@@ -75,7 +75,7 @@ export declare const getGranuleTimeToArchive: ({ post_to_cmr_duration, }?: {
|
|
|
75
75
|
* Granule processing time info, if any
|
|
76
76
|
* @returns {Promise<ExecutionProcessingTimes | undefined>}
|
|
77
77
|
*/
|
|
78
|
-
export declare const getGranuleProcessingTimeInfo: (processingTimeInfo?: ExecutionProcessingTimes
|
|
78
|
+
export declare const getGranuleProcessingTimeInfo: (processingTimeInfo?: ExecutionProcessingTimes) => ExecutionProcessingTimes | {};
|
|
79
79
|
/**
|
|
80
80
|
* Get granule temporal information from argument or directly from CMR.
|
|
81
81
|
*
|
package/Granules.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Granules.d.ts","sourceRoot":"","sources":["src/Granules.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EACL,UAAU,EACV,aAAa,EACb,mBAAmB,EACnB,cAAc,EACf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,UAAU,0BAA2B,SAAQ,OAAO,CAAC,IAAI;IACvD,OAAO,CAAC,EAAE;QACR,WAAW,CA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ACtB,CAAA;CACF;AAED,UAAU,mBAAoB,SAAQ,OAAO,CAAC,cAAc;IAC1D,IAAI,EAAE,0BAA0B,CAAC;IACjC,OAAO,EAAE;QACP,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;KACpB,CAAA;CACF;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,YACpB,mBAAmB,KAC3B,OAAO,EAAqC,CAAC;AAEhD;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,YACpB,mBAAmB,KAC3B,OAAmD,CAAC;AAEvD;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,mBACX,QAAQ,cAAc,WAC7B,cAAc,KACtB,QAAQ,cAAc,GAAG,aAAiD,CAAC;AAE9E;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,YACvB,mBAAmB,YACS,CAAC;AAExC;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,kBAAkB,OAAO,EAAE,KAAQ,MAMtE,CAAC;AAEF,eAAO,MAAM,0BAA0B;;YAEA,CAAC;AAExC,eAAO,MAAM,uBAAuB;;YAEE,CAAC;AAiBvC;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,wBAClB,wBAAwB,KAC5C,wBAAwB,GAAG,EAQ7B,CAAC;AAWF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,yBAAyB;aAK3B,cAAc;;cAEb,aAAa;MACrB,QAAQ,mBAAmB,GAAG,EAAE,CAUnC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB;aAqB1B,cAAc;;kBAET,MAAM;;uBAED,MAAM;;;YAGjB,aAAa;;eAEV,MAAM;;;eAGN,MAAM;cACP,aAAa;;cAEb,MAAM;mBACD,MAAM;sBACH,MAAM;mBACT,MAAM;MACnB,QAAQ,UAAU,CAkDrB,CAAC"}
|
package/README.md
CHANGED
|
@@ -113,6 +113,9 @@ update the status of any granules/PDRs that don't exist in the initial execu
|
|
|
113
113
|
input.</p>
|
|
114
114
|
<p>Falls back to overall execution input.</p>
|
|
115
115
|
</dd>
|
|
116
|
+
<dt><a href="#isFileExtensionMatched">isFileExtensionMatched(granuleFile, extension)</a> ⇒ <code>boolean</code></dt>
|
|
117
|
+
<dd><p>Check if the file has the extension</p>
|
|
118
|
+
</dd>
|
|
116
119
|
<dt><a href="#parseException">parseException(exception)</a> ⇒ <code>string</code></dt>
|
|
117
120
|
<dd><p>Ensures that the exception is returned as an object</p>
|
|
118
121
|
</dd>
|
|
@@ -543,6 +546,19 @@ Falls back to overall execution input.
|
|
|
543
546
|
| inputCumulusMessage | <code>Object</code> | Workflow execution input message |
|
|
544
547
|
| getExecutionHistoryFunction | <code>function</code> | Testing override for mock/etc of StepFunctions.getExecutionHistory |
|
|
545
548
|
|
|
549
|
+
<a name="isFileExtensionMatched"></a>
|
|
550
|
+
|
|
551
|
+
### isFileExtensionMatched(granuleFile, extension) ⇒ <code>boolean</code>
|
|
552
|
+
Check if the file has the extension
|
|
553
|
+
|
|
554
|
+
**Kind**: global function
|
|
555
|
+
**Returns**: <code>boolean</code> - whether the file has the extension
|
|
556
|
+
|
|
557
|
+
| Param | Type | Description |
|
|
558
|
+
| --- | --- | --- |
|
|
559
|
+
| granuleFile | <code>ApiFile</code> | Granule file |
|
|
560
|
+
| extension | <code>string</code> | File extension to check |
|
|
561
|
+
|
|
546
562
|
<a name="parseException"></a>
|
|
547
563
|
|
|
548
564
|
### parseException(exception) ⇒ <code>string</code>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cumulus/message",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.0.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": ">=
|
|
11
|
+
"node": ">=14.19.1"
|
|
12
12
|
},
|
|
13
13
|
"publishConfig": {
|
|
14
14
|
"access": "public"
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"author": "Cumulus Authors",
|
|
39
39
|
"license": "Apache-2.0",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@cumulus/aws-client": "
|
|
42
|
-
"@cumulus/common": "
|
|
43
|
-
"@cumulus/errors": "
|
|
44
|
-
"@cumulus/logger": "
|
|
45
|
-
"@cumulus/types": "
|
|
41
|
+
"@cumulus/aws-client": "13.0.0",
|
|
42
|
+
"@cumulus/common": "13.0.0",
|
|
43
|
+
"@cumulus/errors": "13.0.0",
|
|
44
|
+
"@cumulus/logger": "13.0.0",
|
|
45
|
+
"@cumulus/types": "13.0.0",
|
|
46
46
|
"jsonpath-plus": "^3.0.0",
|
|
47
47
|
"lodash": "^4.17.21",
|
|
48
48
|
"uuid": "^8.2.0"
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/uuid": "^8.0.0"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "ba43ea3bfdfcacfff052770ed2fd357eb9dadb58"
|
|
54
54
|
}
|
package/src/utils.ts
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import isNil from 'lodash/isNil';
|
|
2
2
|
import isObject from 'lodash/isObject';
|
|
3
|
+
import { ApiFile } from '@cumulus/types/api/files';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Check if the file has the extension
|
|
7
|
+
*
|
|
8
|
+
* @param {ApiFile} granuleFile - Granule file
|
|
9
|
+
* @param {string} extension - File extension to check
|
|
10
|
+
* @returns {boolean} whether the file has the extension
|
|
11
|
+
*/
|
|
12
|
+
export const isFileExtensionMatched = (granuleFile: ApiFile, extension: string) => {
|
|
13
|
+
const fileName = granuleFile.key || granuleFile.name || granuleFile.filename || '';
|
|
14
|
+
return fileName.endsWith(extension);
|
|
15
|
+
};
|
|
3
16
|
|
|
4
17
|
/**
|
|
5
18
|
* Ensures that the exception is returned as an object
|