@cumulus/message 10.0.0 → 10.1.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/Build.d.ts.map +1 -1
- package/Build.js.map +1 -1
- package/Collections.d.ts +3 -0
- package/Collections.d.ts.map +1 -1
- package/Collections.js +6 -3
- package/Collections.js.map +1 -1
- package/DeadLetterMessage.d.ts +16 -0
- package/DeadLetterMessage.d.ts.map +1 -0
- package/DeadLetterMessage.js +42 -0
- package/DeadLetterMessage.js.map +1 -0
- package/Executions.d.ts +19 -4
- package/Executions.d.ts.map +1 -1
- package/Executions.js +51 -3
- package/Executions.js.map +1 -1
- package/Granules.d.ts +76 -10
- package/Granules.d.ts.map +1 -1
- package/Granules.js +140 -2
- package/Granules.js.map +1 -1
- package/PDRs.d.ts +18 -12
- package/PDRs.d.ts.map +1 -1
- package/PDRs.js +73 -4
- package/PDRs.js.map +1 -1
- package/StepFunctions.d.ts +56 -0
- package/StepFunctions.d.ts.map +1 -1
- package/StepFunctions.js +127 -8
- package/StepFunctions.js.map +1 -1
- package/package.json +2 -3
- package/src/Build.ts +1 -1
- package/src/Collections.ts +6 -2
- package/src/DeadLetterMessage.ts +54 -0
- package/src/Executions.ts +77 -7
- package/src/Granules.ts +214 -3
- package/src/PDRs.ts +99 -13
- package/src/StepFunctions.ts +158 -1
- package/src/types.ts +5 -0
- package/src/utils.ts +17 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/types.d.ts +4 -0
- package/types.d.ts.map +1 -1
- package/utils.d.ts +8 -0
- package/utils.d.ts.map +1 -0
- package/utils.js +26 -0
- package/utils.js.map +1 -0
- package/LICENSE +0 -60
package/Build.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Build.d.ts","sourceRoot":"","sources":["src/Build.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Build.d.ts","sourceRoot":"","sources":["src/Build.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EACL,uBAAuB,EACvB,kCAAkC,EAClC,QAAQ,EACT,MAAM,SAAS,CAAC;AAYjB;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB;kBAOb,MAAM;;;yBAGC,kCAAkC;;MAErD,QAAQ,WASX,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,6BAA6B;wBAUpB,MAAM;qBACT,uBAAuB;aAC/B,MAAM;cACL,QAAQ;;;;;MAKhB,QAAQ,cAmBX,CAAC"}
|
package/Build.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Build.js","sourceRoot":"","sources":["src/Build.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;AAEb;;;;;;;GAOG;AAEH,yDAAiC;
|
|
1
|
+
{"version":3,"file":"Build.js","sourceRoot":"","sources":["src/Build.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;AAEb;;;;;;;GAOG;AAEH,yDAAiC;AAGjC,+BAAoC;AAOpC;;;;;;GAMG;AACH,MAAM,mBAAmB,GAAG,CAAC,MAAe,EAAU,EAAE,CACtD,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,IAAA,SAAM,GAAE,EAAE,CAAC,CAAC,CAAC,IAAA,SAAM,GAAE,CAAC,CAAC;AAEhD;;;;;;;;;;;;GAYG;AACI,MAAM,gBAAgB,GAAG,CAAC,EAC/B,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,GAOpB,EAAuB,EAAE;IACxB,MAAM,WAAW,GAAwB;QACvC,GAAG,mBAAmB;QACtB,cAAc,EAAE,mBAAmB,CAAC,mBAAmB,CAAC;QACxD,aAAa,EAAE,YAAY;KAC5B,CAAC;IACF,IAAI,kBAAkB;QAAE,WAAW,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IAC5E,IAAI,gBAAgB;QAAE,WAAW,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IACtE,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC;AArBW,QAAA,gBAAgB,oBAqB3B;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACI,MAAM,6BAA6B,GAAG,CAAC,EAC5C,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,OAAO,EACP,QAAQ,EACR,iBAAiB,GAAG,EAAE,EACtB,UAAU,GAAG,EAAE,EACf,mBAAmB,GAUpB,EAA0B,EAAE;IAC3B,MAAM,WAAW,GAAG,IAAA,wBAAgB,EAAC;QACnC,gBAAgB;QAChB,kBAAkB;QAClB,YAAY,EAAE,QAAQ,CAAC,GAAG;QAC1B,mBAAmB,EAAE,eAAe,CAAC,YAAY;QACjD,mBAAmB;KACpB,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG;QACd,GAAG,eAAe;QAClB,IAAI,EAAE,IAAA,eAAK,EAAC,eAAe,CAAC,IAAI,EAAE,UAAU,EAAE;YAC5C,aAAa,EAAE,QAAQ,CAAC,IAAI;SAC7B,CAAC;QACF,YAAY,EAAE,IAAA,eAAK,EAAC,iBAAiB,EAAE,WAAW,CAAC;QACnD,OAAO;KACR,CAAC;IAEF,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AArCW,QAAA,6BAA6B,iCAqCxC"}
|
package/Collections.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ declare type CollectionInfo = {
|
|
|
12
12
|
name: string;
|
|
13
13
|
version: string;
|
|
14
14
|
};
|
|
15
|
+
export declare const collectionIdSeparator = "___";
|
|
15
16
|
/**
|
|
16
17
|
* Returns the collection ID.
|
|
17
18
|
*
|
|
@@ -28,6 +29,8 @@ export declare const constructCollectionId: (name: string, version: string) => s
|
|
|
28
29
|
*
|
|
29
30
|
* @param {string} collectionId - collectionId used in elasticsearch index
|
|
30
31
|
* @returns {Object} name and version as object
|
|
32
|
+
*
|
|
33
|
+
* @alias module:Collections
|
|
31
34
|
*/
|
|
32
35
|
export declare const deconstructCollectionId: (collectionId: string) => {
|
|
33
36
|
name: string;
|
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;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,SAAU,MAAM,WAAW,MAAM,
|
|
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,eAAO,MAAM,qBAAqB,QAAQ,CAAC;AAE3C;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,SAAU,MAAM,WAAW,MAAM,WACtB,CAAC;AAE9C;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,iBAAkB,MAAM;;;CAe3D,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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCollectionIdFromMessage = exports.getCollectionNameAndVersionFromMessage = exports.deconstructCollectionId = exports.constructCollectionId = void 0;
|
|
3
|
+
exports.getCollectionIdFromMessage = exports.getCollectionNameAndVersionFromMessage = exports.deconstructCollectionId = exports.constructCollectionId = exports.collectionIdSeparator = void 0;
|
|
4
|
+
exports.collectionIdSeparator = '___';
|
|
4
5
|
/**
|
|
5
6
|
* Returns the collection ID.
|
|
6
7
|
*
|
|
@@ -10,7 +11,7 @@ exports.getCollectionIdFromMessage = exports.getCollectionNameAndVersionFromMess
|
|
|
10
11
|
*
|
|
11
12
|
* @alias module:Collections
|
|
12
13
|
*/
|
|
13
|
-
const constructCollectionId = (name, version) => `${name}
|
|
14
|
+
const constructCollectionId = (name, version) => `${name}${exports.collectionIdSeparator}${version}`;
|
|
14
15
|
exports.constructCollectionId = constructCollectionId;
|
|
15
16
|
/**
|
|
16
17
|
* Returns the name and version of a collection based on
|
|
@@ -18,12 +19,14 @@ exports.constructCollectionId = constructCollectionId;
|
|
|
18
19
|
*
|
|
19
20
|
* @param {string} collectionId - collectionId used in elasticsearch index
|
|
20
21
|
* @returns {Object} name and version as object
|
|
22
|
+
*
|
|
23
|
+
* @alias module:Collections
|
|
21
24
|
*/
|
|
22
25
|
const deconstructCollectionId = (collectionId) => {
|
|
23
26
|
let name;
|
|
24
27
|
let version;
|
|
25
28
|
try {
|
|
26
|
-
[name, version] = collectionId.split(
|
|
29
|
+
[name, version] = collectionId.split(exports.collectionIdSeparator);
|
|
27
30
|
}
|
|
28
31
|
catch (error) {
|
|
29
32
|
throw new Error(`invalid collectionId: ${JSON.stringify(collectionId)}`);
|
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;;;AAmBA,QAAA,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IACzD,IAAI,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE;QACrB,OAAO,SAAS,CAAC;KAClB;IACD,OAAO;QACL,IAAI;QACJ,OAAO;KACR,CAAC;AACJ,CAAC,CAAC;AAZW,QAAA,sCAAsC,0CAYjD;AAEF;;;;;;;;;GASG;AACI,MAAM,0BAA0B,GAAG,CACxC,OAA+B,EACX,EAAE;IACtB,MAAM,cAAc,GAAG,4BAA4B,CAAC,OAAO,CAAC,CAAC;IAC7D,MAAM,iBAAiB,GAAG,+BAA+B,CAAC,OAAO,CAAC,CAAC;IACnE,IAAI,CAAC,cAAc,IAAI,CAAC,iBAAiB,EAAE;QACzC,OAAO,SAAS,CAAC;KAClB;IACD,OAAO,IAAA,6BAAqB,EAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;AAClE,CAAC,CAAC;AATW,QAAA,0BAA0B,8BASrC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SQSRecord, EventBridgeEvent } from 'aws-lambda';
|
|
2
|
+
import { CumulusMessage } from '@cumulus/types/message';
|
|
3
|
+
declare type StepFunctionEventBridgeEvent = EventBridgeEvent<'Step Functions Execution Status Change', {
|
|
4
|
+
[key: string]: string;
|
|
5
|
+
}>;
|
|
6
|
+
declare type UnwrapDeadLetterCumulusMessageReturnType = (StepFunctionEventBridgeEvent | AWS.SQS.Message | SQSRecord | CumulusMessage);
|
|
7
|
+
/**
|
|
8
|
+
* Unwrap dead letter Cumulus message, which may be wrapped in a
|
|
9
|
+
* States cloudwatch event, which is wrapped in an SQS message.
|
|
10
|
+
*
|
|
11
|
+
* @param {Object} messageBody - received SQS message
|
|
12
|
+
* @returns {Object} the cumulus message or nearest available object
|
|
13
|
+
*/
|
|
14
|
+
export declare const unwrapDeadLetterCumulusMessage: (messageBody: UnwrapDeadLetterCumulusMessageReturnType) => Promise<UnwrapDeadLetterCumulusMessageReturnType>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=DeadLetterMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeadLetterMessage.d.ts","sourceRoot":"","sources":["src/DeadLetterMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAGzD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAOxD,aAAK,4BAA4B,GAAG,gBAAgB,CAAC,wCAAwC,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC,CAAC;AAC1H,aAAK,wCAAwC,GAAG,CAC9C,4BAA4B,GAC1B,GAAG,CAAC,GAAG,CAAC,OAAO,GACf,SAAS,GACT,cAAc,CACjB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B,gBAC5B,wCAAwC,KACpD,QAAQ,wCAAwC,CA0BlD,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.unwrapDeadLetterCumulusMessage = void 0;
|
|
7
|
+
const SQS_1 = require("@cumulus/aws-client/SQS");
|
|
8
|
+
const logger_1 = __importDefault(require("@cumulus/logger"));
|
|
9
|
+
const StepFunctions_1 = require("./StepFunctions");
|
|
10
|
+
const log = new logger_1.default({ sender: '@cumulus/DeadLetterMessage' });
|
|
11
|
+
/**
|
|
12
|
+
* Unwrap dead letter Cumulus message, which may be wrapped in a
|
|
13
|
+
* States cloudwatch event, which is wrapped in an SQS message.
|
|
14
|
+
*
|
|
15
|
+
* @param {Object} messageBody - received SQS message
|
|
16
|
+
* @returns {Object} the cumulus message or nearest available object
|
|
17
|
+
*/
|
|
18
|
+
const unwrapDeadLetterCumulusMessage = async (messageBody) => {
|
|
19
|
+
try {
|
|
20
|
+
if ('cumulus_meta' in messageBody) {
|
|
21
|
+
return messageBody;
|
|
22
|
+
}
|
|
23
|
+
if ('Body' in messageBody || 'body' in messageBody) {
|
|
24
|
+
// AWS.SQS.Message/SQS.Record case
|
|
25
|
+
const unwrappedMessageBody = (0, SQS_1.parseSQSMessageBody)(messageBody);
|
|
26
|
+
return await (0, exports.unwrapDeadLetterCumulusMessage)(unwrappedMessageBody);
|
|
27
|
+
}
|
|
28
|
+
if (!('detail' in messageBody)) {
|
|
29
|
+
// Non-typed catchall
|
|
30
|
+
return messageBody;
|
|
31
|
+
}
|
|
32
|
+
// StepFunctionEventBridgeEvent case
|
|
33
|
+
const unwrappedMessageBody = await (0, StepFunctions_1.getCumulusMessageFromExecutionEvent)(messageBody);
|
|
34
|
+
return await (0, exports.unwrapDeadLetterCumulusMessage)(unwrappedMessageBody);
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
log.error('Falling back to storing wrapped message after encountering unwrap error', error);
|
|
38
|
+
return messageBody;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
exports.unwrapDeadLetterCumulusMessage = unwrapDeadLetterCumulusMessage;
|
|
42
|
+
//# sourceMappingURL=DeadLetterMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeadLetterMessage.js","sourceRoot":"","sources":["src/DeadLetterMessage.ts"],"names":[],"mappings":";;;;;;AAEA,iDAA8D;AAE9D,6DAAqC;AAErC,mDAAsE;AAEtE,MAAM,GAAG,GAAG,IAAI,gBAAM,CAAC,EAAE,MAAM,EAAE,4BAA4B,EAAE,CAAC,CAAC;AAUjE;;;;;;GAMG;AACI,MAAM,8BAA8B,GAAG,KAAK,EACjD,WAAqD,EACF,EAAE;IACrD,IAAI;QACF,IAAI,cAAc,IAAI,WAAW,EAAE;YACjC,OAAO,WAAW,CAAC;SACpB;QACD,IAAI,MAAM,IAAI,WAAW,IAAI,MAAM,IAAI,WAAW,EAAE;YAClD,kCAAkC;YAClC,MAAM,oBAAoB,GAAG,IAAA,yBAAmB,EAC9C,WAAW,CACM,CAAC;YACpB,OAAO,MAAM,IAAA,sCAA8B,EAAC,oBAAoB,CAAC,CAAC;SACnE;QACD,IAAI,CAAC,CAAC,QAAQ,IAAI,WAAW,CAAC,EAAE;YAC9B,qBAAqB;YACrB,OAAO,WAAW,CAAC;SACpB;QACD,oCAAoC;QACpC,MAAM,oBAAoB,GAAG,MAAM,IAAA,mDAAmC,EAAC,WAAW,CAAC,CAAC;QACpF,OAAO,MAAM,IAAA,sCAA8B,EAAC,oBAAoB,CAAC,CAAC;KACnE;IAAC,OAAO,KAAK,EAAE;QACd,GAAG,CAAC,KAAK,CACP,yEAAyE,EACzE,KAAK,CACN,CAAC;QACF,OAAO,WAAW,CAAC;KACpB;AACH,CAAC,CAAC;AA5BW,QAAA,8BAA8B,kCA4BzC"}
|
package/Executions.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { Message } from '@cumulus/types';
|
|
2
|
+
import { ExecutionRecord } from '@cumulus/types/api/executions';
|
|
3
|
+
interface MessageWithPayload extends Message.CumulusMessage {
|
|
4
|
+
payload: object;
|
|
5
|
+
}
|
|
2
6
|
/**
|
|
3
7
|
* Build execution ARN from a state machine ARN and execution name
|
|
4
8
|
*
|
|
@@ -77,19 +81,30 @@ export declare const getMessageCumulusVersion: (message: Message.CumulusMessage)
|
|
|
77
81
|
/**
|
|
78
82
|
* Get the workflow original payload, if any.
|
|
79
83
|
*
|
|
80
|
-
* @param {
|
|
84
|
+
* @param {MessageWithPayload} message - A workflow message object
|
|
81
85
|
* @returns {unknown|undefined} The workflow original payload
|
|
82
86
|
*
|
|
83
87
|
* @alias module:Executions
|
|
84
88
|
*/
|
|
85
|
-
export declare const getMessageExecutionOriginalPayload: (message:
|
|
89
|
+
export declare const getMessageExecutionOriginalPayload: (message: MessageWithPayload) => object | undefined;
|
|
86
90
|
/**
|
|
87
91
|
* Get the workflow final payload, if any.
|
|
88
92
|
*
|
|
89
|
-
* @param {
|
|
93
|
+
* @param {MessageWithPayload} message - A workflow message object
|
|
90
94
|
* @returns {unknown|undefined} The workflow final payload
|
|
91
95
|
*
|
|
92
96
|
* @alias module:Executions
|
|
93
97
|
*/
|
|
94
|
-
export declare const getMessageExecutionFinalPayload: (message:
|
|
98
|
+
export declare const getMessageExecutionFinalPayload: (message: MessageWithPayload) => object | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* Generate an execution record for the API from the message.
|
|
101
|
+
*
|
|
102
|
+
* @param {MessageWithPayload} message - A workflow message object
|
|
103
|
+
* @param {string} [updatedAt] - Optional updated timestamp to apply to record
|
|
104
|
+
* @returns {ExecutionRecord} An execution API record
|
|
105
|
+
*
|
|
106
|
+
* @alias module:Executions
|
|
107
|
+
*/
|
|
108
|
+
export declare const generateExecutionApiRecordFromMessage: (message: MessageWithPayload, updatedAt?: number) => ExecutionRecord;
|
|
109
|
+
export {};
|
|
95
110
|
//# sourceMappingURL=Executions.d.ts.map
|
package/Executions.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Executions.d.ts","sourceRoot":"","sources":["src/Executions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Executions.d.ts","sourceRoot":"","sources":["src/Executions.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAkBhE,UAAU,kBAAmB,SAAQ,OAAO,CAAC,cAAc;IACzD,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,oBACX,MAAM,iBACR,MAAM,kBAOtB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,iBAAkB,MAAM,WAI1D,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,kCAAkC,iBAC/B,MAAM,kBAMrB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,YACzB,QAAQ,cAAc,WAOhC,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,YAC3B,QAAQ,cAAc,WAOhC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,YACxB,QAAQ,cAAc,kBAUhC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,YAC9B,QAAQ,cAAc,KAC9B,MAAM,GAAG,SAAqD,CAAC;AAElE;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,YAC1B,QAAQ,cAAc,KAC9B,MAAM,GAAG,SAAkD,CAAC;AAE/D;;;;;;;GAOG;AACH,eAAO,MAAM,kCAAkC,YACpC,kBAAkB,uBAI5B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,YACjC,kBAAkB,uBAI5B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,qCAAqC,YACvC,kBAAkB,yBAE1B,eAkCF,CAAC"}
|
package/Executions.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getMessageExecutionFinalPayload = exports.getMessageExecutionOriginalPayload = exports.getMessageCumulusVersion = exports.getMessageExecutionParentArn = exports.getMessageExecutionArn = exports.getMessageStateMachineArn = exports.getMessageExecutionName = exports.getStateMachineArnFromExecutionArn = exports.getExecutionUrlFromArn = exports.buildExecutionArn = void 0;
|
|
6
|
+
exports.generateExecutionApiRecordFromMessage = exports.getMessageExecutionFinalPayload = exports.getMessageExecutionOriginalPayload = exports.getMessageCumulusVersion = exports.getMessageExecutionParentArn = exports.getMessageExecutionArn = exports.getMessageStateMachineArn = exports.getMessageExecutionName = exports.getStateMachineArnFromExecutionArn = exports.getExecutionUrlFromArn = exports.buildExecutionArn = void 0;
|
|
7
7
|
/**
|
|
8
8
|
* Utility functions for generating execution information or parsing execution information
|
|
9
9
|
* from a Cumulus message
|
|
@@ -14,7 +14,12 @@ exports.getMessageExecutionFinalPayload = exports.getMessageExecutionOriginalPay
|
|
|
14
14
|
* const Executions = require('@cumulus/message/Executions');
|
|
15
15
|
*/
|
|
16
16
|
const isString_1 = __importDefault(require("lodash/isString"));
|
|
17
|
+
const isNil_1 = __importDefault(require("lodash/isNil"));
|
|
18
|
+
const omitBy_1 = __importDefault(require("lodash/omitBy"));
|
|
19
|
+
const AsyncOperations_1 = require("./AsyncOperations");
|
|
20
|
+
const Collections_1 = require("./Collections");
|
|
17
21
|
const workflows_1 = require("./workflows");
|
|
22
|
+
const utils_1 = require("./utils");
|
|
18
23
|
/**
|
|
19
24
|
* Build execution ARN from a state machine ARN and execution name
|
|
20
25
|
*
|
|
@@ -135,7 +140,7 @@ exports.getMessageCumulusVersion = getMessageCumulusVersion;
|
|
|
135
140
|
/**
|
|
136
141
|
* Get the workflow original payload, if any.
|
|
137
142
|
*
|
|
138
|
-
* @param {
|
|
143
|
+
* @param {MessageWithPayload} message - A workflow message object
|
|
139
144
|
* @returns {unknown|undefined} The workflow original payload
|
|
140
145
|
*
|
|
141
146
|
* @alias module:Executions
|
|
@@ -148,7 +153,7 @@ exports.getMessageExecutionOriginalPayload = getMessageExecutionOriginalPayload;
|
|
|
148
153
|
/**
|
|
149
154
|
* Get the workflow final payload, if any.
|
|
150
155
|
*
|
|
151
|
-
* @param {
|
|
156
|
+
* @param {MessageWithPayload} message - A workflow message object
|
|
152
157
|
* @returns {unknown|undefined} The workflow final payload
|
|
153
158
|
*
|
|
154
159
|
* @alias module:Executions
|
|
@@ -158,4 +163,47 @@ const getMessageExecutionFinalPayload = (message) => {
|
|
|
158
163
|
return status === 'running' ? undefined : message.payload;
|
|
159
164
|
};
|
|
160
165
|
exports.getMessageExecutionFinalPayload = getMessageExecutionFinalPayload;
|
|
166
|
+
/**
|
|
167
|
+
* Generate an execution record for the API from the message.
|
|
168
|
+
*
|
|
169
|
+
* @param {MessageWithPayload} message - A workflow message object
|
|
170
|
+
* @param {string} [updatedAt] - Optional updated timestamp to apply to record
|
|
171
|
+
* @returns {ExecutionRecord} An execution API record
|
|
172
|
+
*
|
|
173
|
+
* @alias module:Executions
|
|
174
|
+
*/
|
|
175
|
+
const generateExecutionApiRecordFromMessage = (message, updatedAt = Date.now()) => {
|
|
176
|
+
const arn = (0, exports.getMessageExecutionArn)(message);
|
|
177
|
+
if ((0, isNil_1.default)(arn))
|
|
178
|
+
throw new Error('Unable to determine execution ARN from Cumulus message');
|
|
179
|
+
const status = (0, workflows_1.getMetaStatus)(message);
|
|
180
|
+
if (!status)
|
|
181
|
+
throw new Error('Unable to determine status from Cumulus message');
|
|
182
|
+
const now = Date.now();
|
|
183
|
+
const workflowStartTime = (0, workflows_1.getMessageWorkflowStartTime)(message);
|
|
184
|
+
const workflowStopTime = (0, workflows_1.getMessageWorkflowStopTime)(message);
|
|
185
|
+
const collectionId = (0, Collections_1.getCollectionIdFromMessage)(message);
|
|
186
|
+
const record = {
|
|
187
|
+
name: (0, exports.getMessageExecutionName)(message),
|
|
188
|
+
cumulusVersion: (0, exports.getMessageCumulusVersion)(message),
|
|
189
|
+
arn,
|
|
190
|
+
asyncOperationId: (0, AsyncOperations_1.getMessageAsyncOperationId)(message),
|
|
191
|
+
parentArn: (0, exports.getMessageExecutionParentArn)(message),
|
|
192
|
+
execution: (0, exports.getExecutionUrlFromArn)(arn),
|
|
193
|
+
tasks: (0, workflows_1.getMessageWorkflowTasks)(message),
|
|
194
|
+
error: (0, utils_1.parseException)(message.exception),
|
|
195
|
+
type: (0, workflows_1.getMessageWorkflowName)(message),
|
|
196
|
+
collectionId,
|
|
197
|
+
status,
|
|
198
|
+
createdAt: workflowStartTime,
|
|
199
|
+
timestamp: now,
|
|
200
|
+
updatedAt,
|
|
201
|
+
originalPayload: (0, exports.getMessageExecutionOriginalPayload)(message),
|
|
202
|
+
finalPayload: (0, exports.getMessageExecutionFinalPayload)(message),
|
|
203
|
+
duration: (0, workflows_1.getWorkflowDuration)(workflowStartTime, workflowStopTime),
|
|
204
|
+
};
|
|
205
|
+
const updated = (0, omitBy_1.default)(record, isNil_1.default);
|
|
206
|
+
return updated;
|
|
207
|
+
};
|
|
208
|
+
exports.generateExecutionApiRecordFromMessage = generateExecutionApiRecordFromMessage;
|
|
161
209
|
//# sourceMappingURL=Executions.js.map
|
package/Executions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Executions.js","sourceRoot":"","sources":["src/Executions.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;AAEb;;;;;;;;GAQG;AAEH,+DAAuC;
|
|
1
|
+
{"version":3,"file":"Executions.js","sourceRoot":"","sources":["src/Executions.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;AAEb;;;;;;;;GAQG;AAEH,+DAAuC;AACvC,yDAAiC;AACjC,2DAAmC;AAKnC,uDAE2B;AAC3B,+CAEuB;AACvB,2CAOqB;AACrB,mCAAyC;AAMzC;;;;;;;;GAQG;AACI,MAAM,iBAAiB,GAAG,CAC/B,eAAuB,EACvB,aAAqB,EACrB,EAAE;IACF,IAAI,eAAe,IAAI,aAAa,EAAE;QACpC,MAAM,KAAK,GAAG,eAAe,CAAC,OAAO,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;QACnE,OAAO,GAAG,KAAK,IAAI,aAAa,EAAE,CAAC;KACpC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AATW,QAAA,iBAAiB,qBAS5B;AAEF;;;;;;;GAOG;AACI,MAAM,sBAAsB,GAAG,CAAC,YAAoB,EAAE,EAAE;IAC7D,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,WAAW,CAAC;IAC7D,OAAO,qDAAqD,MA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,CAAC;IACvD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AArCW,QAAA,qCAAqC,yCAqChD"}
|
package/Granules.d.ts
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utility functions for parsing granule information from a Cumulus message
|
|
3
|
-
* @module Granules
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* const Granules = require('@cumulus/message/Granules');
|
|
7
|
-
*/
|
|
8
1
|
import { Message } from '@cumulus/types';
|
|
9
|
-
import {
|
|
2
|
+
import { ExecutionProcessingTimes } from '@cumulus/types/api/executions';
|
|
3
|
+
import { ApiGranule, GranuleStatus, GranuleTemporalInfo, MessageGranule } from '@cumulus/types/api/granules';
|
|
4
|
+
import { ApiFile } from '@cumulus/types/api/files';
|
|
5
|
+
import { CmrUtilsClass } from './types';
|
|
10
6
|
interface MetaWithGranuleQueryFields extends Message.Meta {
|
|
11
7
|
granule?: {
|
|
12
8
|
queryFields?: unknown;
|
|
@@ -41,12 +37,12 @@ export declare const messageHasGranules: (message: MessageWithGranules) => boole
|
|
|
41
37
|
* Determine the status of a granule.
|
|
42
38
|
*
|
|
43
39
|
* @param {string} workflowStatus - The workflow status
|
|
44
|
-
* @param {
|
|
40
|
+
* @param {MessageGranule} granule - A granule record conforming to the 'api' schema
|
|
45
41
|
* @returns {string} The granule status
|
|
46
42
|
*
|
|
47
43
|
* @alias module:Granules
|
|
48
44
|
*/
|
|
49
|
-
export declare const getGranuleStatus: (workflowStatus: Message.WorkflowStatus, granule:
|
|
45
|
+
export declare const getGranuleStatus: (workflowStatus: Message.WorkflowStatus, granule: MessageGranule) => Message.WorkflowStatus | GranuleStatus;
|
|
50
46
|
/**
|
|
51
47
|
* Get the query fields of a granule, if any
|
|
52
48
|
*
|
|
@@ -56,5 +52,75 @@ export declare const getGranuleStatus: (workflowStatus: Message.WorkflowStatus,
|
|
|
56
52
|
* @alias module:Granules
|
|
57
53
|
*/
|
|
58
54
|
export declare const getGranuleQueryFields: (message: MessageWithGranules) => unknown;
|
|
55
|
+
/**
|
|
56
|
+
* Calculate granule product volume, which is the sum of the file
|
|
57
|
+
* sizes in bytes
|
|
58
|
+
*
|
|
59
|
+
* @param {Array<Object>} granuleFiles - array of granule file objects that conform to the
|
|
60
|
+
* Cumulus 'api' schema
|
|
61
|
+
* @returns {string} - sum of granule file sizes in bytes as a string
|
|
62
|
+
*/
|
|
63
|
+
export declare const getGranuleProductVolume: (granuleFiles?: ApiFile[]) => string;
|
|
64
|
+
export declare const getGranuleTimeToPreprocess: ({ sync_granule_duration, }?: {
|
|
65
|
+
sync_granule_duration?: number | undefined;
|
|
66
|
+
}) => number;
|
|
67
|
+
export declare const getGranuleTimeToArchive: ({ post_to_cmr_duration, }?: {
|
|
68
|
+
post_to_cmr_duration?: number | undefined;
|
|
69
|
+
}) => number;
|
|
70
|
+
/**
|
|
71
|
+
* Convert granule processing timestamps to a standardized ISO string
|
|
72
|
+
* format for compatibility across database systems.
|
|
73
|
+
*
|
|
74
|
+
* @param {ExecutionProcessingTimes} [processingTimeInfo]
|
|
75
|
+
* Granule processing time info, if any
|
|
76
|
+
* @returns {Promise<ExecutionProcessingTimes | undefined>}
|
|
77
|
+
*/
|
|
78
|
+
export declare const getGranuleProcessingTimeInfo: (processingTimeInfo?: ExecutionProcessingTimes | undefined) => ExecutionProcessingTimes | {};
|
|
79
|
+
/**
|
|
80
|
+
* Get granule temporal information from argument or directly from CMR.
|
|
81
|
+
*
|
|
82
|
+
* Converts temporal information timestamps to a standardized ISO string
|
|
83
|
+
* format for compatibility across database systems.
|
|
84
|
+
*
|
|
85
|
+
* @param {Object} params
|
|
86
|
+
* @param {MessageGranule} params.granule - Granule from workflow message
|
|
87
|
+
* @param {Object} [params.cmrTemporalInfo] - CMR temporal info, if any
|
|
88
|
+
* @param {CmrUtilsClass} params.cmrUtils - CMR utilities object
|
|
89
|
+
* @returns {Promise<GranuleTemporalInfo | undefined>}
|
|
90
|
+
*/
|
|
91
|
+
export declare const getGranuleCmrTemporalInfo: ({ granule, cmrTemporalInfo, cmrUtils, }: {
|
|
92
|
+
granule: MessageGranule;
|
|
93
|
+
cmrTemporalInfo?: GranuleTemporalInfo | undefined;
|
|
94
|
+
cmrUtils: CmrUtilsClass;
|
|
95
|
+
}) => Promise<GranuleTemporalInfo | {}>;
|
|
96
|
+
/**
|
|
97
|
+
* Generate an API granule record
|
|
98
|
+
*
|
|
99
|
+
* @param {MessageWithGranules} message - A workflow message
|
|
100
|
+
* @returns {Promise<ApiGranule>} The granule API record
|
|
101
|
+
*
|
|
102
|
+
* @alias module:Granules
|
|
103
|
+
*/
|
|
104
|
+
export declare const generateGranuleApiRecord: ({ granule, executionUrl, collectionId, provider, workflowStartTime, error, pdrName, status, queryFields, updatedAt, files, processingTimeInfo, cmrUtils, timestamp, duration, productVolume, timeToPreprocess, timeToArchive, cmrTemporalInfo, }: {
|
|
105
|
+
granule: MessageGranule;
|
|
106
|
+
executionUrl?: string | undefined;
|
|
107
|
+
collectionId: string;
|
|
108
|
+
provider?: string | undefined;
|
|
109
|
+
workflowStartTime: number;
|
|
110
|
+
error?: Object | undefined;
|
|
111
|
+
pdrName?: string | undefined;
|
|
112
|
+
status: GranuleStatus;
|
|
113
|
+
queryFields?: Object | undefined;
|
|
114
|
+
updatedAt: number;
|
|
115
|
+
processingTimeInfo?: ExecutionProcessingTimes | undefined;
|
|
116
|
+
files?: ApiFile[] | undefined;
|
|
117
|
+
timestamp: number;
|
|
118
|
+
cmrUtils: CmrUtilsClass;
|
|
119
|
+
cmrTemporalInfo?: GranuleTemporalInfo | undefined;
|
|
120
|
+
duration: number;
|
|
121
|
+
productVolume: string;
|
|
122
|
+
timeToPreprocess: number;
|
|
123
|
+
timeToArchive: number;
|
|
124
|
+
}) => Promise<ApiGranule>;
|
|
59
125
|
export {};
|
|
60
126
|
//# sourceMappingURL=Granules.d.ts.map
|
package/Granules.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Granules.d.ts","sourceRoot":"","sources":["src/Granules.ts"],"names":[],"mappings":"
|
|
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,CAAC,EAAE,OAAO,CAAA;KACtB,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,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,CA8CrB,CAAC"}
|
package/Granules.js
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getGranuleQueryFields = exports.getGranuleStatus = exports.messageHasGranules = exports.getMessageGranules = void 0;
|
|
6
|
+
exports.generateGranuleApiRecord = exports.getGranuleCmrTemporalInfo = exports.getGranuleProcessingTimeInfo = exports.getGranuleTimeToArchive = exports.getGranuleTimeToPreprocess = exports.getGranuleProductVolume = exports.getGranuleQueryFields = exports.getGranuleStatus = exports.messageHasGranules = exports.getMessageGranules = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Utility functions for parsing granule information from a Cumulus message
|
|
9
|
+
* @module Granules
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const Granules = require('@cumulus/message/Granules');
|
|
13
|
+
*/
|
|
14
|
+
const isInteger_1 = __importDefault(require("lodash/isInteger"));
|
|
15
|
+
const isNil_1 = __importDefault(require("lodash/isNil"));
|
|
16
|
+
const mapValues_1 = __importDefault(require("lodash/mapValues"));
|
|
17
|
+
const omitBy_1 = __importDefault(require("lodash/omitBy"));
|
|
18
|
+
const errors_1 = require("@cumulus/errors");
|
|
4
19
|
/**
|
|
5
20
|
* Get granules from payload?.granules of a workflow message.
|
|
6
21
|
*
|
|
@@ -26,7 +41,7 @@ exports.messageHasGranules = messageHasGranules;
|
|
|
26
41
|
* Determine the status of a granule.
|
|
27
42
|
*
|
|
28
43
|
* @param {string} workflowStatus - The workflow status
|
|
29
|
-
* @param {
|
|
44
|
+
* @param {MessageGranule} granule - A granule record conforming to the 'api' schema
|
|
30
45
|
* @returns {string} The granule status
|
|
31
46
|
*
|
|
32
47
|
* @alias module:Granules
|
|
@@ -43,4 +58,127 @@ exports.getGranuleStatus = getGranuleStatus;
|
|
|
43
58
|
*/
|
|
44
59
|
const getGranuleQueryFields = (message) => { var _a, _b; return (_b = (_a = message.meta) === null || _a === void 0 ? void 0 : _a.granule) === null || _b === void 0 ? void 0 : _b.queryFields; };
|
|
45
60
|
exports.getGranuleQueryFields = getGranuleQueryFields;
|
|
61
|
+
/**
|
|
62
|
+
* Calculate granule product volume, which is the sum of the file
|
|
63
|
+
* sizes in bytes
|
|
64
|
+
*
|
|
65
|
+
* @param {Array<Object>} granuleFiles - array of granule file objects that conform to the
|
|
66
|
+
* Cumulus 'api' schema
|
|
67
|
+
* @returns {string} - sum of granule file sizes in bytes as a string
|
|
68
|
+
*/
|
|
69
|
+
const getGranuleProductVolume = (granuleFiles = []) => {
|
|
70
|
+
if (granuleFiles.length === 0)
|
|
71
|
+
return '0';
|
|
72
|
+
return String(granuleFiles
|
|
73
|
+
.map((f) => { var _a; return (_a = f.size) !== null && _a !== void 0 ? _a : 0; })
|
|
74
|
+
.filter(isInteger_1.default)
|
|
75
|
+
.reduce((x, y) => x + BigInt(y), BigInt(0)));
|
|
76
|
+
};
|
|
77
|
+
exports.getGranuleProductVolume = getGranuleProductVolume;
|
|
78
|
+
const getGranuleTimeToPreprocess = ({ sync_granule_duration = 0, } = {}) => sync_granule_duration / 1000;
|
|
79
|
+
exports.getGranuleTimeToPreprocess = getGranuleTimeToPreprocess;
|
|
80
|
+
const getGranuleTimeToArchive = ({ post_to_cmr_duration = 0, } = {}) => post_to_cmr_duration / 1000;
|
|
81
|
+
exports.getGranuleTimeToArchive = getGranuleTimeToArchive;
|
|
82
|
+
/**
|
|
83
|
+
* Convert date string to standard ISO format.
|
|
84
|
+
*
|
|
85
|
+
* @param {string} date - Date string, possibly in multiple formats
|
|
86
|
+
* @returns {string} Standardized ISO date string
|
|
87
|
+
*/
|
|
88
|
+
const convertDateToISOString = (date) => new Date(date).toISOString();
|
|
89
|
+
function isProcessingTimeInfo(info = {}) {
|
|
90
|
+
var _a, _b;
|
|
91
|
+
return ((_a = info) === null || _a === void 0 ? void 0 : _a.processingStartDateTime) !== undefined
|
|
92
|
+
&& ((_b = info) === null || _b === void 0 ? void 0 : _b.processingEndDateTime) !== undefined;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Convert granule processing timestamps to a standardized ISO string
|
|
96
|
+
* format for compatibility across database systems.
|
|
97
|
+
*
|
|
98
|
+
* @param {ExecutionProcessingTimes} [processingTimeInfo]
|
|
99
|
+
* Granule processing time info, if any
|
|
100
|
+
* @returns {Promise<ExecutionProcessingTimes | undefined>}
|
|
101
|
+
*/
|
|
102
|
+
const getGranuleProcessingTimeInfo = (processingTimeInfo) => {
|
|
103
|
+
const updatedProcessingTimeInfo = isProcessingTimeInfo(processingTimeInfo)
|
|
104
|
+
? { ...processingTimeInfo }
|
|
105
|
+
: {};
|
|
106
|
+
return (0, mapValues_1.default)(updatedProcessingTimeInfo, convertDateToISOString);
|
|
107
|
+
};
|
|
108
|
+
exports.getGranuleProcessingTimeInfo = getGranuleProcessingTimeInfo;
|
|
109
|
+
function isGranuleTemporalInfo(info = {}) {
|
|
110
|
+
var _a, _b, _c, _d;
|
|
111
|
+
return ((_a = info) === null || _a === void 0 ? void 0 : _a.beginningDateTime) !== undefined
|
|
112
|
+
&& ((_b = info) === null || _b === void 0 ? void 0 : _b.endingDateTime) !== undefined
|
|
113
|
+
&& ((_c = info) === null || _c === void 0 ? void 0 : _c.productionDateTime) !== undefined
|
|
114
|
+
&& ((_d = info) === null || _d === void 0 ? void 0 : _d.lastUpdateDateTime) !== undefined;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Get granule temporal information from argument or directly from CMR.
|
|
118
|
+
*
|
|
119
|
+
* Converts temporal information timestamps to a standardized ISO string
|
|
120
|
+
* format for compatibility across database systems.
|
|
121
|
+
*
|
|
122
|
+
* @param {Object} params
|
|
123
|
+
* @param {MessageGranule} params.granule - Granule from workflow message
|
|
124
|
+
* @param {Object} [params.cmrTemporalInfo] - CMR temporal info, if any
|
|
125
|
+
* @param {CmrUtilsClass} params.cmrUtils - CMR utilities object
|
|
126
|
+
* @returns {Promise<GranuleTemporalInfo | undefined>}
|
|
127
|
+
*/
|
|
128
|
+
const getGranuleCmrTemporalInfo = async ({ granule, cmrTemporalInfo, cmrUtils, }) => {
|
|
129
|
+
// Get CMR temporalInfo (beginningDateTime, endingDateTime,
|
|
130
|
+
// productionDateTime, lastUpdateDateTime)
|
|
131
|
+
const temporalInfo = isGranuleTemporalInfo(cmrTemporalInfo)
|
|
132
|
+
? { ...cmrTemporalInfo }
|
|
133
|
+
: await cmrUtils.getGranuleTemporalInfo(granule);
|
|
134
|
+
return (0, mapValues_1.default)(temporalInfo, convertDateToISOString);
|
|
135
|
+
};
|
|
136
|
+
exports.getGranuleCmrTemporalInfo = getGranuleCmrTemporalInfo;
|
|
137
|
+
/**
|
|
138
|
+
* Generate an API granule record
|
|
139
|
+
*
|
|
140
|
+
* @param {MessageWithGranules} message - A workflow message
|
|
141
|
+
* @returns {Promise<ApiGranule>} The granule API record
|
|
142
|
+
*
|
|
143
|
+
* @alias module:Granules
|
|
144
|
+
*/
|
|
145
|
+
const generateGranuleApiRecord = async ({ granule, executionUrl, collectionId, provider, workflowStartTime, error, pdrName, status, queryFields, updatedAt, files, processingTimeInfo, cmrUtils, timestamp, duration, productVolume, timeToPreprocess, timeToArchive, cmrTemporalInfo, }) => {
|
|
146
|
+
if (!granule.granuleId)
|
|
147
|
+
throw new errors_1.CumulusMessageError(`Could not create granule record, invalid granuleId: ${granule.granuleId}`);
|
|
148
|
+
if (!collectionId) {
|
|
149
|
+
throw new errors_1.CumulusMessageError('collectionId required to generate a granule record');
|
|
150
|
+
}
|
|
151
|
+
const { granuleId, cmrLink, published = false, createdAt, } = granule;
|
|
152
|
+
// Get CMR temporalInfo
|
|
153
|
+
const temporalInfo = await (0, exports.getGranuleCmrTemporalInfo)({
|
|
154
|
+
granule,
|
|
155
|
+
cmrTemporalInfo,
|
|
156
|
+
cmrUtils,
|
|
157
|
+
});
|
|
158
|
+
const updatedProcessingTimeInfo = (0, exports.getGranuleProcessingTimeInfo)(processingTimeInfo);
|
|
159
|
+
const record = {
|
|
160
|
+
granuleId,
|
|
161
|
+
pdrName,
|
|
162
|
+
collectionId,
|
|
163
|
+
status,
|
|
164
|
+
provider,
|
|
165
|
+
execution: executionUrl,
|
|
166
|
+
cmrLink,
|
|
167
|
+
files,
|
|
168
|
+
error,
|
|
169
|
+
published,
|
|
170
|
+
createdAt: createdAt || workflowStartTime,
|
|
171
|
+
timestamp,
|
|
172
|
+
updatedAt,
|
|
173
|
+
duration,
|
|
174
|
+
productVolume,
|
|
175
|
+
timeToPreprocess,
|
|
176
|
+
timeToArchive,
|
|
177
|
+
...updatedProcessingTimeInfo,
|
|
178
|
+
...temporalInfo,
|
|
179
|
+
queryFields,
|
|
180
|
+
};
|
|
181
|
+
return (0, omitBy_1.default)(record, isNil_1.default);
|
|
182
|
+
};
|
|
183
|
+
exports.generateGranuleApiRecord = generateGranuleApiRecord;
|
|
46
184
|
//# sourceMappingURL=Granules.js.map
|
package/Granules.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Granules.js","sourceRoot":"","sources":["src/Granules.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC
|
|
1
|
+
{"version":3,"file":"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