@cumulus/message 10.1.1-alpha.0 → 11.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/Collections.d.ts +1 -1
- package/Collections.d.ts.map +1 -1
- package/Collections.js +11 -9
- package/Collections.js.map +1 -1
- package/Granules.d.ts.map +1 -1
- package/Granules.js +11 -10
- package/Granules.js.map +1 -1
- package/LICENSE +60 -0
- package/README.md +193 -50
- package/StepFunctions.d.ts +1 -1
- package/StepFunctions.js +6 -2
- package/StepFunctions.js.map +1 -1
- package/package.json +9 -8
- package/src/Collections.ts +13 -11
- package/src/Granules.ts +6 -2
- package/src/StepFunctions.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/Collections.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Message } from '@cumulus/types';
|
|
2
|
+
export declare const collectionIdSeparator = "___";
|
|
2
3
|
/**
|
|
3
4
|
* Utility functions for generating collection information or parsing collection information
|
|
4
5
|
* from a Cumulus message
|
|
@@ -12,7 +13,6 @@ declare type CollectionInfo = {
|
|
|
12
13
|
name: string;
|
|
13
14
|
version: string;
|
|
14
15
|
};
|
|
15
|
-
export declare const collectionIdSeparator = "___";
|
|
16
16
|
/**
|
|
17
17
|
* Returns the collection ID.
|
|
18
18
|
*
|
package/Collections.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Collections.d.ts","sourceRoot":"","sources":["src/Collections.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC;;;;;;;;GAQG;AAEH,aAAK,cAAc,GAAG;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAChB,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"Collections.d.ts","sourceRoot":"","sources":["src/Collections.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,eAAO,MAAM,qBAAqB,QAAQ,CAAC;AAE3C;;;;;;;;GAQG;AAEH,aAAK,cAAc,GAAG;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAChB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,SAAU,MAAM,WAAW,MAAM,WACtB,CAAC;AAE9C;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,iBAAkB,MAAM;;;CAiB3D,CAAC;AA4BF;;;;;;;;GAQG;AACH,eAAO,MAAM,sCAAsC,YACxC,QAAQ,cAAc,KAC9B,cAAc,GAAG,SAUnB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,YAC5B,QAAQ,cAAc,KAC9B,MAAM,GAAG,SAOX,CAAC"}
|
package/Collections.js
CHANGED
|
@@ -26,18 +26,20 @@ const deconstructCollectionId = (collectionId) => {
|
|
|
26
26
|
let name;
|
|
27
27
|
let version;
|
|
28
28
|
try {
|
|
29
|
-
|
|
29
|
+
const last = collectionId.lastIndexOf(exports.collectionIdSeparator);
|
|
30
|
+
name = collectionId.substring(0, last);
|
|
31
|
+
version = collectionId.substring(last + exports.collectionIdSeparator.length);
|
|
32
|
+
if (name && version) {
|
|
33
|
+
return {
|
|
34
|
+
name,
|
|
35
|
+
version,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
30
38
|
}
|
|
31
39
|
catch (error) {
|
|
32
|
-
|
|
40
|
+
// do nothing, error thrown below
|
|
33
41
|
}
|
|
34
|
-
|
|
35
|
-
return {
|
|
36
|
-
name,
|
|
37
|
-
version,
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
throw new Error(`invalid collectionId: ${collectionId}`);
|
|
42
|
+
throw new Error(`invalid collectionId: ${JSON.stringify(collectionId)}`);
|
|
41
43
|
};
|
|
42
44
|
exports.deconstructCollectionId = deconstructCollectionId;
|
|
43
45
|
/**
|
package/Collections.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Collections.js","sourceRoot":"","sources":["src/Collections.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;
|
|
1
|
+
{"version":3,"file":"Collections.js","sourceRoot":"","sources":["src/Collections.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAIA,QAAA,qBAAqB,GAAG,KAAK,CAAC;AAiB3C;;;;;;;;GAQG;AACI,MAAM,qBAAqB,GAAG,CAAC,IAAY,EAAE,OAAe,EAAE,EAAE,CACrE,GAAG,IAAI,GAAG,6BAAqB,GAAG,OAAO,EAAE,CAAC;AADjC,QAAA,qBAAqB,yBACY;AAE9C;;;;;;;;GAQG;AACI,MAAM,uBAAuB,GAAG,CAAC,YAAoB,EAAE,EAAE;IAC9D,IAAI,IAAI,CAAC;IACT,IAAI,OAAO,CAAC;IACZ,IAAI;QACF,MAAM,IAAI,GAAG,YAAY,CAAC,WAAW,CAAC,6BAAqB,CAAC,CAAC;QAC7D,IAAI,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;QACvC,OAAO,GAAG,YAAY,CAAC,SAAS,CAAC,IAAI,GAAG,6BAAqB,CAAC,MAAM,CAAC,CAAC;QACtE,IAAI,IAAI,IAAI,OAAO,EAAE;YACnB,OAAO;gBACL,IAAI;gBACJ,OAAO;aACR,CAAC;SACH;KACF;IAAC,OAAO,KAAK,EAAE;QACd,iCAAiC;KAClC;IACD,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;AAC3E,CAAC,CAAC;AAjBW,QAAA,uBAAuB,2BAiBlC;AAEF;;;;;;;;GAQG;AACH,MAAM,4BAA4B,GAAG,CACnC,OAA+B,EACX,EAAE,eAAC,OAAA,MAAA,MAAA,OAAO,CAAC,IAAI,0CAAE,UAAU,0CAAE,IAAI,CAAA,EAAA,CAAC;AAExD;;;;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AAM,4BAA4B,iEAEtC,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/Granules.js
CHANGED
|
@@ -87,9 +87,8 @@ exports.getGranuleTimeToArchive = getGranuleTimeToArchive;
|
|
|
87
87
|
*/
|
|
88
88
|
const convertDateToISOString = (date) => new Date(date).toISOString();
|
|
89
89
|
function isProcessingTimeInfo(info = {}) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
&& ((_b = info) === null || _b === void 0 ? void 0 : _b.processingEndDateTime) !== undefined;
|
|
90
|
+
return (info === null || info === void 0 ? void 0 : info.processingStartDateTime) !== undefined
|
|
91
|
+
&& (info === null || info === void 0 ? void 0 : info.processingEndDateTime) !== undefined;
|
|
93
92
|
}
|
|
94
93
|
/**
|
|
95
94
|
* Convert granule processing timestamps to a standardized ISO string
|
|
@@ -107,11 +106,10 @@ const getGranuleProcessingTimeInfo = (processingTimeInfo) => {
|
|
|
107
106
|
};
|
|
108
107
|
exports.getGranuleProcessingTimeInfo = getGranuleProcessingTimeInfo;
|
|
109
108
|
function isGranuleTemporalInfo(info = {}) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
&& (
|
|
113
|
-
&& (
|
|
114
|
-
&& ((_d = info) === null || _d === void 0 ? void 0 : _d.lastUpdateDateTime) !== undefined;
|
|
109
|
+
return (info === null || info === void 0 ? void 0 : info.beginningDateTime) !== undefined
|
|
110
|
+
&& (info === null || info === void 0 ? void 0 : info.endingDateTime) !== undefined
|
|
111
|
+
&& (info === null || info === void 0 ? void 0 : info.productionDateTime) !== undefined
|
|
112
|
+
&& (info === null || info === void 0 ? void 0 : info.lastUpdateDateTime) !== undefined;
|
|
115
113
|
}
|
|
116
114
|
/**
|
|
117
115
|
* Get granule temporal information from argument or directly from CMR.
|
|
@@ -149,6 +147,9 @@ const generateGranuleApiRecord = async ({ granule, executionUrl, collectionId, p
|
|
|
149
147
|
throw new errors_1.CumulusMessageError('collectionId required to generate a granule record');
|
|
150
148
|
}
|
|
151
149
|
const { granuleId, cmrLink, published = false, createdAt, } = granule;
|
|
150
|
+
const now = Date.now();
|
|
151
|
+
const recordUpdatedAt = updatedAt !== null && updatedAt !== void 0 ? updatedAt : now;
|
|
152
|
+
const recordTimestamp = timestamp !== null && timestamp !== void 0 ? timestamp : now;
|
|
152
153
|
// Get CMR temporalInfo
|
|
153
154
|
const temporalInfo = await (0, exports.getGranuleCmrTemporalInfo)({
|
|
154
155
|
granule,
|
|
@@ -168,8 +169,8 @@ const generateGranuleApiRecord = async ({ granule, executionUrl, collectionId, p
|
|
|
168
169
|
error,
|
|
169
170
|
published,
|
|
170
171
|
createdAt: createdAt || workflowStartTime,
|
|
171
|
-
timestamp,
|
|
172
|
-
updatedAt,
|
|
172
|
+
timestamp: recordTimestamp,
|
|
173
|
+
updatedAt: recordUpdatedAt,
|
|
173
174
|
duration,
|
|
174
175
|
productVolume,
|
|
175
176
|
timeToPreprocess,
|
package/Granules.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Granules.js","sourceRoot":"","sources":["src/Granules.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;AAEb;;;;;;GAMG;AAEH,iEAAyC;AACzC,yDAAiC;AACjC,iEAAyC;AACzC,2DAAmC;AAEnC,4CAAsD;AA0BtD;;;;;;;;GAQG;AACI,MAAM,kBAAkB,GAAG,CAChC,OAA4B,EACjB,EAAE,eAAC,OAAA,MAAA,MAAA,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AAwB,4BA0FnC"}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
Copyright © 2020 United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All Rights Reserved.
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
|
|
4
|
+
You may obtain a copy of the License at
|
|
5
|
+
|
|
6
|
+
http://www.apache.org/licenses/LICE NSE-2.0
|
|
7
|
+
|
|
8
|
+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
14
|
+
|
|
15
|
+
1. Definitions.
|
|
16
|
+
|
|
17
|
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
|
18
|
+
|
|
19
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
|
20
|
+
|
|
21
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
|
24
|
+
|
|
25
|
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
|
26
|
+
|
|
27
|
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
|
28
|
+
|
|
29
|
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
|
30
|
+
|
|
31
|
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
|
32
|
+
|
|
33
|
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
|
34
|
+
|
|
35
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
|
36
|
+
|
|
37
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
|
38
|
+
|
|
39
|
+
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
|
40
|
+
|
|
41
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
|
42
|
+
|
|
43
|
+
You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
|
44
|
+
You must cause any modified files to carry prominent notices stating that You changed the files; and
|
|
45
|
+
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
|
46
|
+
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
|
47
|
+
|
|
48
|
+
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
|
49
|
+
|
|
50
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
|
51
|
+
|
|
52
|
+
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
|
53
|
+
|
|
54
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
|
55
|
+
|
|
56
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
|
57
|
+
|
|
58
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
|
59
|
+
|
|
60
|
+
END OF TERMS AND CONDITIONS
|
package/README.md
CHANGED
|
@@ -20,12 +20,12 @@ Utilities for building and parsing Cumulus workflow messages.
|
|
|
20
20
|
<dd><p>Utility functions for generating execution information or parsing execution information
|
|
21
21
|
from a Cumulus message</p>
|
|
22
22
|
</dd>
|
|
23
|
+
<dt><a href="#module_Granules">Granules</a></dt>
|
|
24
|
+
<dd><p>Utility functions for parsing granule information from a Cumulus message</p>
|
|
25
|
+
</dd>
|
|
23
26
|
<dt><a href="#module_Queue">Queue</a></dt>
|
|
24
27
|
<dd><p>Utility functions for parsing queue information from a Cumulus message</p>
|
|
25
28
|
</dd>
|
|
26
|
-
<dt><a href="#module_StepFunctions">StepFunctions</a></dt>
|
|
27
|
-
<dd><p>Utility functions for working with AWS Step Function events/messages</p>
|
|
28
|
-
</dd>
|
|
29
29
|
</dl>
|
|
30
30
|
|
|
31
31
|
### Functions
|
|
@@ -37,7 +37,7 @@ from a Cumulus message</p>
|
|
|
37
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
|
-
<dt><a href="#deconstructCollectionId">deconstructCollectionId(collectionId)</a> ⇒ <code>Object</code
|
|
40
|
+
<dt><a href="#exp_module_Collections--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>
|
|
@@ -47,17 +47,9 @@ the collectionId used in elasticsearch indexing</p>
|
|
|
47
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="#
|
|
51
|
-
<dd><p>
|
|
52
|
-
|
|
53
|
-
<dt><a href="#exp_module_Granules--messageHasGranules">messageHasGranules(message)</a> ⇒ <code>boolean</code> ⏏</dt>
|
|
54
|
-
<dd><p>Determine if message has a granules object.</p>
|
|
55
|
-
</dd>
|
|
56
|
-
<dt><a href="#exp_module_Granules--getGranuleStatus">getGranuleStatus(workflowStatus, granule)</a> ⇒ <code>string</code> ⏏</dt>
|
|
57
|
-
<dd><p>Determine the status of a granule.</p>
|
|
58
|
-
</dd>
|
|
59
|
-
<dt><a href="#exp_module_Granules--getGranuleQueryFields">getGranuleQueryFields(message)</a> ⇒ <code>unknown</code> | <code>undefined</code> ⏏</dt>
|
|
60
|
-
<dd><p>Get the query fields of a granule, if any</p>
|
|
50
|
+
<dt><a href="#unwrapDeadLetterCumulusMessage">unwrapDeadLetterCumulusMessage(messageBody)</a> ⇒ <code>Object</code></dt>
|
|
51
|
+
<dd><p>Unwrap dead letter Cumulus message, which may be wrapped in a
|
|
52
|
+
States cloudwatch event, which is wrapped in an SQS message.</p>
|
|
61
53
|
</dd>
|
|
62
54
|
<dt><a href="#exp_module_PDRs--getMessagePdr">getMessagePdr(message)</a> ⇒ <code>undefined</code> | <code>Object</code> ⏏</dt>
|
|
63
55
|
<dd><p>Get the PDR object from a workflow message, if any.</p>
|
|
@@ -89,12 +81,41 @@ the collectionId used in elasticsearch indexing</p>
|
|
|
89
81
|
<dt><a href="#exp_module_PDRs--getPdrPercentCompletion">getPdrPercentCompletion(stats)</a> ⇒ <code>number</code> ⏏</dt>
|
|
90
82
|
<dd><p>Get the percent completion of PDR executions</p>
|
|
91
83
|
</dd>
|
|
84
|
+
<dt><a href="#exp_module_Executions--generatePdrApiRecordFromMessage">generatePdrApiRecordFromMessage(message, [updatedAt])</a> ⇒ <code>ExecutionRecord</code> ⏏</dt>
|
|
85
|
+
<dd><p>Generate a PDR record for the API from the message.</p>
|
|
86
|
+
</dd>
|
|
92
87
|
<dt><a href="#exp_module_Providers--getMessageProvider">getMessageProvider(message)</a> ⇒ <code>MessageProvider</code> | <code>string</code> ⏏</dt>
|
|
93
88
|
<dd><p>Get the provider from a workflow message, if any.</p>
|
|
94
89
|
</dd>
|
|
95
90
|
<dt><a href="#exp_module_Providers--getMessageProviderId">getMessageProviderId(message)</a> ⇒ <code>undefined</code> | <code>string</code> ⏏</dt>
|
|
96
91
|
<dd><p>Get the provider ID from a workflow message, if any.</p>
|
|
97
92
|
</dd>
|
|
93
|
+
<dt><a href="#exp_module_StepFunctions--pullStepFunctionEvent">pullStepFunctionEvent(event)</a> ⇒ <code>Promise.<Object></code> ⏏</dt>
|
|
94
|
+
<dd><p>Given a Step Function event, replace specified key in event with contents
|
|
95
|
+
of S3 remote message</p>
|
|
96
|
+
</dd>
|
|
97
|
+
<dt><a href="#exp_module_StepFunctions--parseStepMessage">parseStepMessage(stepMessage, stepName)</a> ⇒ <code>Promise.<Object></code> ⏏</dt>
|
|
98
|
+
<dd><p>Parse step message with CMA keys and replace specified key in event with contents
|
|
99
|
+
of S3 remote message</p>
|
|
100
|
+
</dd>
|
|
101
|
+
<dt><a href="#getFailedStepName">getFailedStepName(events, failedStepEvent)</a> ⇒ <code>string</code></dt>
|
|
102
|
+
<dd><p>Searches the Execution step History for the TaskStateEntered pertaining to
|
|
103
|
+
the failed task Id. HistoryEvent ids are numbered sequentially, starting at
|
|
104
|
+
one.</p>
|
|
105
|
+
</dd>
|
|
106
|
+
<dt><a href="#lastFailedEventStep">lastFailedEventStep(events)</a> ⇒ <code>HistoryEventList</code> | <code>undefined</code></dt>
|
|
107
|
+
<dd><p>Finds all failed execution events and returns the last one in the list.</p>
|
|
108
|
+
</dd>
|
|
109
|
+
<dt><a href="#getFailedExecutionMessage">getFailedExecutionMessage(inputCumulusMessage, getExecutionHistoryFunction)</a> ⇒ <code>Object</code></dt>
|
|
110
|
+
<dd><p>Get message to use for publishing failed execution notifications.</p>
|
|
111
|
+
<p>Try to get the input to the last failed step in the execution so we can
|
|
112
|
+
update the status of any granules/PDRs that don't exist in the initial execution
|
|
113
|
+
input.</p>
|
|
114
|
+
<p>Falls back to overall execution input.</p>
|
|
115
|
+
</dd>
|
|
116
|
+
<dt><a href="#parseException">parseException(exception)</a> ⇒ <code>string</code></dt>
|
|
117
|
+
<dd><p>Ensures that the exception is returned as an object</p>
|
|
118
|
+
</dd>
|
|
98
119
|
<dt><a href="#exp_module_workflows--getMetaStatus">getMetaStatus(message)</a> ⇒ <code>Message.WorkflowStatus</code> | <code>undefined</code> ⏏</dt>
|
|
99
120
|
<dd><p>Get the status of a workflow message, if any.</p>
|
|
100
121
|
</dd>
|
|
@@ -168,6 +189,9 @@ const Executions = require('@cumulus/message/Executions');
|
|
|
168
189
|
* [getMessageCumulusVersion(message)](#exp_module_Executions--getMessageCumulusVersion) ⇒ <code>undefined</code> \| <code>string</code> ⏏
|
|
169
190
|
* [getMessageExecutionOriginalPayload(message)](#exp_module_Executions--getMessageExecutionOriginalPayload) ⇒ <code>unknown</code> \| <code>undefined</code> ⏏
|
|
170
191
|
* [getMessageExecutionFinalPayload(message)](#exp_module_Executions--getMessageExecutionFinalPayload) ⇒ <code>unknown</code> \| <code>undefined</code> ⏏
|
|
192
|
+
* [generateExecutionApiRecordFromMessage(message, [updatedAt])](#exp_module_Executions--generateExecutionApiRecordFromMessage) ⇒ <code>ExecutionRecord</code> ⏏
|
|
193
|
+
* _global_
|
|
194
|
+
* [generatePdrApiRecordFromMessage(message, [updatedAt])](#exp_module_Executions--generatePdrApiRecordFromMessage) ⇒ <code>ExecutionRecord</code> ⏏
|
|
171
195
|
|
|
172
196
|
<a name="exp_module_Executions--buildExecutionArn"></a>
|
|
173
197
|
|
|
@@ -284,7 +308,7 @@ Get the workflow original payload, if any.
|
|
|
284
308
|
|
|
285
309
|
| Param | Type | Description |
|
|
286
310
|
| --- | --- | --- |
|
|
287
|
-
| message | <code>
|
|
311
|
+
| message | <code>MessageWithPayload</code> | A workflow message object |
|
|
288
312
|
|
|
289
313
|
<a name="exp_module_Executions--getMessageExecutionFinalPayload"></a>
|
|
290
314
|
|
|
@@ -296,7 +320,112 @@ Get the workflow final payload, if any.
|
|
|
296
320
|
|
|
297
321
|
| Param | Type | Description |
|
|
298
322
|
| --- | --- | --- |
|
|
299
|
-
| message | <code>
|
|
323
|
+
| message | <code>MessageWithPayload</code> | A workflow message object |
|
|
324
|
+
|
|
325
|
+
<a name="exp_module_Executions--generateExecutionApiRecordFromMessage"></a>
|
|
326
|
+
|
|
327
|
+
#### generateExecutionApiRecordFromMessage(message, [updatedAt]) ⇒ <code>ExecutionRecord</code> ⏏
|
|
328
|
+
Generate an execution record for the API from the message.
|
|
329
|
+
|
|
330
|
+
**Kind**: Exported function
|
|
331
|
+
**Returns**: <code>ExecutionRecord</code> - An execution API record
|
|
332
|
+
|
|
333
|
+
| Param | Type | Description |
|
|
334
|
+
| --- | --- | --- |
|
|
335
|
+
| message | <code>MessageWithPayload</code> | A workflow message object |
|
|
336
|
+
| [updatedAt] | <code>string</code> | Optional updated timestamp to apply to record |
|
|
337
|
+
|
|
338
|
+
<a name="exp_module_Executions--generatePdrApiRecordFromMessage"></a>
|
|
339
|
+
|
|
340
|
+
#### generatePdrApiRecordFromMessage(message, [updatedAt]) ⇒ <code>ExecutionRecord</code> ⏏
|
|
341
|
+
Generate a PDR record for the API from the message.
|
|
342
|
+
|
|
343
|
+
**Kind**: global method of [<code>Executions</code>](#module_Executions)
|
|
344
|
+
**Returns**: <code>ExecutionRecord</code> - An PDR API record
|
|
345
|
+
|
|
346
|
+
| Param | Type | Description |
|
|
347
|
+
| --- | --- | --- |
|
|
348
|
+
| message | <code>MessageWithOptionalPayloadPdr</code> | A workflow message object |
|
|
349
|
+
| [updatedAt] | <code>string</code> | Optional updated timestamp to apply to record |
|
|
350
|
+
|
|
351
|
+
<a name="module_Granules"></a>
|
|
352
|
+
|
|
353
|
+
### Granules
|
|
354
|
+
Utility functions for parsing granule information from a Cumulus message
|
|
355
|
+
|
|
356
|
+
**Example**
|
|
357
|
+
```js
|
|
358
|
+
const Granules = require('@cumulus/message/Granules');
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
* [Granules](#module_Granules)
|
|
362
|
+
* [getMessageGranules(message)](#exp_module_Granules--getMessageGranules) ⇒ <code>Array.<Object></code> \| <code>undefined</code> ⏏
|
|
363
|
+
* [messageHasGranules(message)](#exp_module_Granules--messageHasGranules) ⇒ <code>boolean</code> ⏏
|
|
364
|
+
* [getGranuleStatus(workflowStatus, granule)](#exp_module_Granules--getGranuleStatus) ⇒ <code>string</code> ⏏
|
|
365
|
+
* [getGranuleQueryFields(message)](#exp_module_Granules--getGranuleQueryFields) ⇒ <code>unknown</code> \| <code>undefined</code> ⏏
|
|
366
|
+
* [generateGranuleApiRecord(message)](#exp_module_Granules--generateGranuleApiRecord) ⇒ <code>Promise.<ApiGranule></code> ⏏
|
|
367
|
+
|
|
368
|
+
<a name="exp_module_Granules--getMessageGranules"></a>
|
|
369
|
+
|
|
370
|
+
#### getMessageGranules(message) ⇒ <code>Array.<Object></code> \| <code>undefined</code> ⏏
|
|
371
|
+
Get granules from payload?.granules of a workflow message.
|
|
372
|
+
|
|
373
|
+
**Kind**: Exported function
|
|
374
|
+
**Returns**: <code>Array.<Object></code> \| <code>undefined</code> - An array of granule objects, or
|
|
375
|
+
undefined if `message.payload.granules` is not set
|
|
376
|
+
|
|
377
|
+
| Param | Type | Description |
|
|
378
|
+
| --- | --- | --- |
|
|
379
|
+
| message | <code>MessageWithGranules</code> | A workflow message |
|
|
380
|
+
|
|
381
|
+
<a name="exp_module_Granules--messageHasGranules"></a>
|
|
382
|
+
|
|
383
|
+
#### messageHasGranules(message) ⇒ <code>boolean</code> ⏏
|
|
384
|
+
Determine if message has a granules object.
|
|
385
|
+
|
|
386
|
+
**Kind**: Exported function
|
|
387
|
+
**Returns**: <code>boolean</code> - true if message has a granules object
|
|
388
|
+
|
|
389
|
+
| Param | Type | Description |
|
|
390
|
+
| --- | --- | --- |
|
|
391
|
+
| message | <code>MessageWithOptionalGranules</code> | A workflow message object |
|
|
392
|
+
|
|
393
|
+
<a name="exp_module_Granules--getGranuleStatus"></a>
|
|
394
|
+
|
|
395
|
+
#### getGranuleStatus(workflowStatus, granule) ⇒ <code>string</code> ⏏
|
|
396
|
+
Determine the status of a granule.
|
|
397
|
+
|
|
398
|
+
**Kind**: Exported function
|
|
399
|
+
**Returns**: <code>string</code> - The granule status
|
|
400
|
+
|
|
401
|
+
| Param | Type | Description |
|
|
402
|
+
| --- | --- | --- |
|
|
403
|
+
| workflowStatus | <code>string</code> | The workflow status |
|
|
404
|
+
| granule | <code>MessageGranule</code> | A granule record conforming to the 'api' schema |
|
|
405
|
+
|
|
406
|
+
<a name="exp_module_Granules--getGranuleQueryFields"></a>
|
|
407
|
+
|
|
408
|
+
#### getGranuleQueryFields(message) ⇒ <code>unknown</code> \| <code>undefined</code> ⏏
|
|
409
|
+
Get the query fields of a granule, if any
|
|
410
|
+
|
|
411
|
+
**Kind**: Exported function
|
|
412
|
+
**Returns**: <code>unknown</code> \| <code>undefined</code> - The granule query fields, if any
|
|
413
|
+
|
|
414
|
+
| Param | Type | Description |
|
|
415
|
+
| --- | --- | --- |
|
|
416
|
+
| message | <code>MessageWithGranules</code> | A workflow message |
|
|
417
|
+
|
|
418
|
+
<a name="exp_module_Granules--generateGranuleApiRecord"></a>
|
|
419
|
+
|
|
420
|
+
#### generateGranuleApiRecord(message) ⇒ <code>Promise.<ApiGranule></code> ⏏
|
|
421
|
+
Generate an API granule record
|
|
422
|
+
|
|
423
|
+
**Kind**: Exported function
|
|
424
|
+
**Returns**: <code>Promise.<ApiGranule></code> - The granule API record
|
|
425
|
+
|
|
426
|
+
| Param | Type | Description |
|
|
427
|
+
| --- | --- | --- |
|
|
428
|
+
| message | <code>MessageWithGranules</code> | A workflow message |
|
|
300
429
|
|
|
301
430
|
<a name="module_Queue"></a>
|
|
302
431
|
|
|
@@ -354,63 +483,77 @@ Determine if there is a queue and queue execution limit in the message.
|
|
|
354
483
|
| --- | --- | --- |
|
|
355
484
|
| message | <code>MessageWithQueueInfo</code> | A workflow message object |
|
|
356
485
|
|
|
357
|
-
<a name="
|
|
486
|
+
<a name="unwrapDeadLetterCumulusMessage"></a>
|
|
358
487
|
|
|
359
|
-
###
|
|
360
|
-
|
|
488
|
+
### unwrapDeadLetterCumulusMessage(messageBody) ⇒ <code>Object</code>
|
|
489
|
+
Unwrap dead letter Cumulus message, which may be wrapped in a
|
|
490
|
+
States cloudwatch event, which is wrapped in an SQS message.
|
|
361
491
|
|
|
362
|
-
**
|
|
363
|
-
|
|
364
|
-
const StepFunctions = require('@cumulus/message/StepFunctions');
|
|
365
|
-
```
|
|
492
|
+
**Kind**: global function
|
|
493
|
+
**Returns**: <code>Object</code> - the cumulus message or nearest available object
|
|
366
494
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
495
|
+
| Param | Type | Description |
|
|
496
|
+
| --- | --- | --- |
|
|
497
|
+
| messageBody | <code>Object</code> | received SQS message |
|
|
370
498
|
|
|
371
|
-
<a name="
|
|
499
|
+
<a name="getFailedStepName"></a>
|
|
372
500
|
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
501
|
+
### getFailedStepName(events, failedStepEvent) ⇒ <code>string</code>
|
|
502
|
+
Searches the Execution step History for the TaskStateEntered pertaining to
|
|
503
|
+
the failed task Id. HistoryEvent ids are numbered sequentially, starting at
|
|
504
|
+
one.
|
|
376
505
|
|
|
377
|
-
**Kind**:
|
|
378
|
-
**Returns**: <code>
|
|
379
|
-
|
|
506
|
+
**Kind**: global function
|
|
507
|
+
**Returns**: <code>string</code> - name of the current stepfunction task or 'UnknownFailedStepName'.
|
|
508
|
+
|
|
509
|
+
| Param | Type | Description |
|
|
510
|
+
| --- | --- | --- |
|
|
511
|
+
| events | <code>Array.<HistoryEvent></code> | Step Function events array |
|
|
512
|
+
| failedStepEvent | <code>HistoryEvent</code> | Step Function's failed event. |
|
|
513
|
+
|
|
514
|
+
<a name="lastFailedEventStep"></a>
|
|
380
515
|
|
|
381
|
-
|
|
516
|
+
### lastFailedEventStep(events) ⇒ <code>HistoryEventList</code> \| <code>undefined</code>
|
|
517
|
+
Finds all failed execution events and returns the last one in the list.
|
|
382
518
|
|
|
519
|
+
**Kind**: global function
|
|
520
|
+
**Returns**: <code>HistoryEventList</code> \| <code>undefined</code> - - the last lambda or activity that failed in the
|
|
521
|
+
event array, or an empty array.
|
|
383
522
|
|
|
384
523
|
| Param | Type | Description |
|
|
385
524
|
| --- | --- | --- |
|
|
386
|
-
|
|
|
525
|
+
| events | <code>Array.<HistoryEventList></code> | array of AWS Stepfunction execution HistoryEvents |
|
|
387
526
|
|
|
388
|
-
<a name="
|
|
527
|
+
<a name="getFailedExecutionMessage"></a>
|
|
389
528
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
of S3 remote message
|
|
529
|
+
### getFailedExecutionMessage(inputCumulusMessage, getExecutionHistoryFunction) ⇒ <code>Object</code>
|
|
530
|
+
Get message to use for publishing failed execution notifications.
|
|
393
531
|
|
|
394
|
-
|
|
395
|
-
|
|
532
|
+
Try to get the input to the last failed step in the execution so we can
|
|
533
|
+
update the status of any granules/PDRs that don't exist in the initial execution
|
|
534
|
+
input.
|
|
535
|
+
|
|
536
|
+
Falls back to overall execution input.
|
|
537
|
+
|
|
538
|
+
**Kind**: global function
|
|
539
|
+
**Returns**: <code>Object</code> - - CumulusMessage Execution step message or execution input message
|
|
396
540
|
|
|
397
541
|
| Param | Type | Description |
|
|
398
542
|
| --- | --- | --- |
|
|
399
|
-
|
|
|
400
|
-
|
|
|
543
|
+
| inputCumulusMessage | <code>Object</code> | Workflow execution input message |
|
|
544
|
+
| getExecutionHistoryFunction | <code>function</code> | Testing override for mock/etc of StepFunctions.getExecutionHistory |
|
|
401
545
|
|
|
402
|
-
<a name="
|
|
546
|
+
<a name="parseException"></a>
|
|
403
547
|
|
|
404
|
-
###
|
|
405
|
-
|
|
406
|
-
the collectionId used in elasticsearch indexing
|
|
548
|
+
### parseException(exception) ⇒ <code>string</code>
|
|
549
|
+
Ensures that the exception is returned as an object
|
|
407
550
|
|
|
408
551
|
**Kind**: global function
|
|
409
|
-
**Returns**: <code>
|
|
552
|
+
**Returns**: <code>string</code> - an stringified exception
|
|
410
553
|
|
|
411
554
|
| Param | Type | Description |
|
|
412
555
|
| --- | --- | --- |
|
|
413
|
-
|
|
|
556
|
+
| exception | <code>Object</code> \| <code>undefined</code> | the exception |
|
|
414
557
|
|
|
415
558
|
|
|
416
559
|
## About Cumulus
|
package/StepFunctions.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export declare const getFailedStepName: (events: AWS.StepFunctions.HistoryEvent[
|
|
|
50
50
|
* Finds all failed execution events and returns the last one in the list.
|
|
51
51
|
*
|
|
52
52
|
* @param {Array<HistoryEventList>} events - array of AWS Stepfunction execution HistoryEvents
|
|
53
|
-
* @returns {
|
|
53
|
+
* @returns {HistoryEventList | undefined} - the last lambda or activity that failed in the
|
|
54
54
|
* event array, or an empty array.
|
|
55
55
|
*/
|
|
56
56
|
export declare const lastFailedEventStep: (events: AWS.StepFunctions.HistoryEvent[]) => AWS.StepFunctions.HistoryEvent | undefined;
|
package/StepFunctions.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -138,7 +142,7 @@ exports.getFailedStepName = getFailedStepName;
|
|
|
138
142
|
* Finds all failed execution events and returns the last one in the list.
|
|
139
143
|
*
|
|
140
144
|
* @param {Array<HistoryEventList>} events - array of AWS Stepfunction execution HistoryEvents
|
|
141
|
-
* @returns {
|
|
145
|
+
* @returns {HistoryEventList | undefined} - the last lambda or activity that failed in the
|
|
142
146
|
* event array, or an empty array.
|
|
143
147
|
*/
|
|
144
148
|
const lastFailedEventStep = (events) => {
|
package/StepFunctions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepFunctions.js","sourceRoot":"","sources":["src/StepFunctions.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC
|
|
1
|
+
{"version":3,"file":"StepFunctions.js","sourceRoot":"","sources":["src/StepFunctions.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;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