@cumulus/message 9.2.0 → 9.2.4
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 +11 -0
- package/Collections.d.ts.map +1 -1
- package/Collections.js +15 -1
- package/Collections.js.map +1 -1
- package/package.json +7 -7
- package/src/Collections.ts +15 -0
package/Collections.d.ts
CHANGED
|
@@ -22,6 +22,17 @@ declare type CollectionInfo = {
|
|
|
22
22
|
* @alias module:Collections
|
|
23
23
|
*/
|
|
24
24
|
export declare const constructCollectionId: (name: string, version: string) => string;
|
|
25
|
+
/**
|
|
26
|
+
* Returns the name and version of a collection based on
|
|
27
|
+
* the collectionId used in elasticsearch indexing
|
|
28
|
+
*
|
|
29
|
+
* @param {string} collectionId - collectionId used in elasticsearch index
|
|
30
|
+
* @returns {Object} name and version as object
|
|
31
|
+
*/
|
|
32
|
+
export declare const deconstructCollectionId: (collectionId: string) => {
|
|
33
|
+
name: string;
|
|
34
|
+
version: string;
|
|
35
|
+
};
|
|
25
36
|
/**
|
|
26
37
|
* Get collection name and version from execution message.
|
|
27
38
|
*
|
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,WAC3C,CAAC;
|
|
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,WAC3C,CAAC;AAEzB;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,iBAAkB,MAAM;;;CAM3D,CAAC;AA4BF;;;;;;;;GAQG;AACH,eAAO,MAAM,sCAAsC,YACxC,OAAO,CAAC,cAAc,KAC9B,cAAc,GAAG,SAUnB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,YAC5B,OAAO,CAAC,cAAc,KAC9B,MAAM,GAAG,SAOX,CAAC"}
|
package/Collections.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCollectionIdFromMessage = exports.getCollectionNameAndVersionFromMessage = exports.constructCollectionId = void 0;
|
|
3
|
+
exports.getCollectionIdFromMessage = exports.getCollectionNameAndVersionFromMessage = exports.deconstructCollectionId = exports.constructCollectionId = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Returns the collection ID.
|
|
6
6
|
*
|
|
@@ -11,6 +11,20 @@ exports.getCollectionIdFromMessage = exports.getCollectionNameAndVersionFromMess
|
|
|
11
11
|
* @alias module:Collections
|
|
12
12
|
*/
|
|
13
13
|
exports.constructCollectionId = (name, version) => `${name}___${version}`;
|
|
14
|
+
/**
|
|
15
|
+
* Returns the name and version of a collection based on
|
|
16
|
+
* the collectionId used in elasticsearch indexing
|
|
17
|
+
*
|
|
18
|
+
* @param {string} collectionId - collectionId used in elasticsearch index
|
|
19
|
+
* @returns {Object} name and version as object
|
|
20
|
+
*/
|
|
21
|
+
exports.deconstructCollectionId = (collectionId) => {
|
|
22
|
+
const [name, version] = collectionId.split('___');
|
|
23
|
+
return {
|
|
24
|
+
name,
|
|
25
|
+
version,
|
|
26
|
+
};
|
|
27
|
+
};
|
|
14
28
|
/**
|
|
15
29
|
* Get collection name from execution message.
|
|
16
30
|
*
|
package/Collections.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Collections.js","sourceRoot":"","sources":["src/Collections.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAmBb;;;;;;;;GAQG;AACU,QAAA,qBAAqB,GAAG,CAAC,IAAY,EAAE,OAAe,EAAE,EAAE,CACrE,GAAG,IAAI,MAAM,OAAO,EAAE,CAAC;AAEzB;;;;;;;;GAQG;AACH,MAAM,4BAA4B,GAAG,CACnC,OAA+B,EACX,EAAE,kCAAC,OAAO,CAAC,IAAI,0CAAE,UAAU,0CAAE,IAAI,GAAA,CAAC;AAExD;;;;;;;;GAQG;AACH,MAAM,+BAA+B,GAAG,CACtC,OAA+B,EACX,EAAE,kCAAC,OAAO,CAAC,IAAI,0CAAE,UAAU,0CAAE,OAAO,GAAA,CAAC;AAE3D;;;;;;;;GAQG;AACU,QAAA,sCAAsC,GAAG,CACpD,OAA+B,EACH,EAAE;IAC9B,MAAM,IAAI,GAAG,4BAA4B,CAAC,OAAO,CAAC,CAAC;IACnD,MAAM,OAAO,GAAG,+BAA+B,CAAC,OAAO,CAAC,CAAC;IACzD,IAAI,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE;QACrB,OAAO,SAAS,CAAC;KAClB;IACD,OAAO;QACL,IAAI;QACJ,OAAO;KACR,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;;;;;GASG;AACU,QAAA,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,6BAAqB,CAAC,cAAc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GAAG,+BAA+B,CAAC,OAAO,CAAC,CAAC;IACnE,IAAI,CAAC,cAAc,IAAI,CAAC,iBAAiB,EAAE;QACzC,OAAO,SAAS,CAAC;KAClB;IACD,OAAO,6BAAqB,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;AAClE,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cumulus/message",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.4",
|
|
4
4
|
"description": "Utilities for building and parsing Cumulus messages",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"GIBS",
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"author": "Cumulus Authors",
|
|
39
39
|
"license": "Apache-2.0",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@cumulus/aws-client": "9.2.
|
|
42
|
-
"@cumulus/common": "9.2.
|
|
43
|
-
"@cumulus/errors": "9.2.
|
|
44
|
-
"@cumulus/logger": "9.2.
|
|
45
|
-
"@cumulus/types": "9.2.
|
|
41
|
+
"@cumulus/aws-client": "9.2.4",
|
|
42
|
+
"@cumulus/common": "9.2.4",
|
|
43
|
+
"@cumulus/errors": "9.2.4",
|
|
44
|
+
"@cumulus/logger": "9.2.4",
|
|
45
|
+
"@cumulus/types": "9.2.4",
|
|
46
46
|
"jsonpath-plus": "^3.0.0",
|
|
47
47
|
"lodash": "^4.17.20",
|
|
48
48
|
"uuid": "^8.2.0"
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/uuid": "^8.0.0"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "5e5890eaefaecdcb54c382dbb2300c794378c593"
|
|
54
54
|
}
|
package/src/Collections.ts
CHANGED
|
@@ -29,6 +29,21 @@ type CollectionInfo = {
|
|
|
29
29
|
export const constructCollectionId = (name: string, version: string) =>
|
|
30
30
|
`${name}___${version}`;
|
|
31
31
|
|
|
32
|
+
/**
|
|
33
|
+
* Returns the name and version of a collection based on
|
|
34
|
+
* the collectionId used in elasticsearch indexing
|
|
35
|
+
*
|
|
36
|
+
* @param {string} collectionId - collectionId used in elasticsearch index
|
|
37
|
+
* @returns {Object} name and version as object
|
|
38
|
+
*/
|
|
39
|
+
export const deconstructCollectionId = (collectionId: string) => {
|
|
40
|
+
const [name, version] = collectionId.split('___');
|
|
41
|
+
return {
|
|
42
|
+
name,
|
|
43
|
+
version,
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
|
|
32
47
|
/**
|
|
33
48
|
* Get collection name from execution message.
|
|
34
49
|
*
|