@cumulus/move-granules 11.1.5 → 12.0.2
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/.babelrc +1 -1
- package/dist/index.js +12 -53
- package/dist/lambda.zip +0 -0
- package/dist/schemas/config.json +0 -9
- package/index.js +3 -13
- package/package.json +10 -11
- package/schemas/config.json +0 -9
package/dist/lambda.zip
CHANGED
|
Binary file
|
package/dist/schemas/config.json
CHANGED
|
@@ -59,15 +59,6 @@
|
|
|
59
59
|
"url_path": { "type": "string" }
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
},
|
|
63
|
-
"meta": {
|
|
64
|
-
"title": "Optional Metadata for the Collection",
|
|
65
|
-
"type": "object",
|
|
66
|
-
"additionalProperties": true,
|
|
67
|
-
"granuleMetadataFileExtension": {
|
|
68
|
-
"description": "Set to the file extension for task to look for the granule metadata information. If none is specified, the granule CMR metadata or ISO metadata file is used",
|
|
69
|
-
"type": "string"
|
|
70
|
-
}
|
|
71
62
|
}
|
|
72
63
|
}
|
|
73
64
|
},
|
package/index.js
CHANGED
|
@@ -27,7 +27,6 @@ const {
|
|
|
27
27
|
const BucketsConfig = require('@cumulus/common/BucketsConfig');
|
|
28
28
|
|
|
29
29
|
const { urlPathTemplate } = require('@cumulus/ingest/url-path-template');
|
|
30
|
-
const { isFileExtensionMatched } = require('@cumulus/message/utils');
|
|
31
30
|
const log = require('@cumulus/common/log');
|
|
32
31
|
|
|
33
32
|
const MB = 1024 * 1024;
|
|
@@ -262,21 +261,12 @@ async function moveGranules(event) {
|
|
|
262
261
|
? config.s3MultipartChunksizeMb : process.env.default_s3_multipart_chunksize_mb;
|
|
263
262
|
|
|
264
263
|
const duplicateHandling = duplicateHandlingType(event);
|
|
265
|
-
const granuleMetadataFileExtension = get(config, 'collection.meta.granuleMetadataFileExtension');
|
|
266
264
|
|
|
267
|
-
log.debug(`moveGranules config duplicateHandling: ${duplicateHandling}, `
|
|
268
|
-
+ `moveStagedFiles: ${moveStagedFiles}, `
|
|
269
|
-
+ `s3MultipartChunksizeMb: ${s3MultipartChunksizeMb}, `
|
|
270
|
-
+ `granuleMetadataFileExtension ${granuleMetadataFileExtension}`);
|
|
271
|
-
|
|
272
|
-
let filterFunc;
|
|
273
|
-
if (granuleMetadataFileExtension) {
|
|
274
|
-
filterFunc = (fileobject) => isFileExtensionMatched(fileobject, granuleMetadataFileExtension);
|
|
275
|
-
} else {
|
|
276
|
-
filterFunc = (fileobject) => isCMRFile(fileobject) || isISOFile(fileobject);
|
|
277
|
-
}
|
|
265
|
+
log.debug(`moveGranules config duplicateHandling: ${duplicateHandling}, moveStagedFiles: ${moveStagedFiles}, s3MultipartChunksizeMb: ${s3MultipartChunksizeMb}`);
|
|
278
266
|
|
|
279
267
|
const granulesInput = event.input.granules;
|
|
268
|
+
|
|
269
|
+
const filterFunc = (fileobject) => isCMRFile(fileobject) || isISOFile(fileobject);
|
|
280
270
|
const cmrFiles = granulesToCmrFileObjects(granulesInput, filterFunc);
|
|
281
271
|
const granulesByGranuleId = keyBy(granulesInput, 'granuleId');
|
|
282
272
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cumulus/move-granules",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.2",
|
|
4
4
|
"description": "Move granule files from staging to final location",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"directories": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"access": "public"
|
|
16
16
|
},
|
|
17
17
|
"engines": {
|
|
18
|
-
"node": ">=
|
|
18
|
+
"node": ">=14.19.1"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
21
|
"generate-task-schemas": "npx generate-task-schemas . files",
|
|
@@ -38,18 +38,17 @@
|
|
|
38
38
|
"author": "Cumulus Authors",
|
|
39
39
|
"license": "Apache-2.0",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@cumulus/aws-client": "
|
|
42
|
-
"@cumulus/cmrjs": "
|
|
43
|
-
"@cumulus/common": "
|
|
41
|
+
"@cumulus/aws-client": "12.0.2",
|
|
42
|
+
"@cumulus/cmrjs": "12.0.2",
|
|
43
|
+
"@cumulus/common": "12.0.2",
|
|
44
44
|
"@cumulus/cumulus-message-adapter-js": "2.0.4",
|
|
45
|
-
"@cumulus/distribution-utils": "
|
|
46
|
-
"@cumulus/errors": "
|
|
47
|
-
"@cumulus/ingest": "
|
|
48
|
-
"@cumulus/message": "11.1.5",
|
|
45
|
+
"@cumulus/distribution-utils": "12.0.2",
|
|
46
|
+
"@cumulus/errors": "12.0.2",
|
|
47
|
+
"@cumulus/ingest": "12.0.2",
|
|
49
48
|
"lodash": "^4.17.21"
|
|
50
49
|
},
|
|
51
50
|
"devDependencies": {
|
|
52
|
-
"@cumulus/schemas": "
|
|
51
|
+
"@cumulus/schemas": "12.0.2"
|
|
53
52
|
},
|
|
54
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "a35accbc4444be2e2b09bd30f3626a0a3780ef22"
|
|
55
54
|
}
|
package/schemas/config.json
CHANGED
|
@@ -59,15 +59,6 @@
|
|
|
59
59
|
"url_path": { "type": "string" }
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
},
|
|
63
|
-
"meta": {
|
|
64
|
-
"title": "Optional Metadata for the Collection",
|
|
65
|
-
"type": "object",
|
|
66
|
-
"additionalProperties": true,
|
|
67
|
-
"granuleMetadataFileExtension": {
|
|
68
|
-
"description": "Set to the file extension for task to look for the granule metadata information. If none is specified, the granule CMR metadata or ISO metadata file is used",
|
|
69
|
-
"type": "string"
|
|
70
|
-
}
|
|
71
62
|
}
|
|
72
63
|
}
|
|
73
64
|
},
|