@saber-usa/node-common 1.7.27 → 1.7.29

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/udl.js +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saber-usa/node-common",
3
- "version": "1.7.27",
3
+ "version": "1.7.29",
4
4
  "description": "Common node functions for Saber",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -23,7 +23,7 @@
23
23
  "author": "Saber USA",
24
24
  "license": "ISC",
25
25
  "dependencies": {
26
- "@aws-sdk/client-s3": "^3.1084.0",
26
+ "@aws-sdk/client-s3": "^3.1085.0",
27
27
  "date-fns": "^4.4.0",
28
28
  "lodash": "4.18.1",
29
29
  "mathjs": "^15.2.0",
@@ -41,7 +41,7 @@
41
41
  "@jest/globals": "^30.4.1",
42
42
  "@sonar/scan": "^4.3.8",
43
43
  "cross-env": "^10.1.0",
44
- "eslint": "^10.6.0",
44
+ "eslint": "^10.7.0",
45
45
  "eslint-plugin-jest": "^29.15.4",
46
46
  "globals": "^17.7.0",
47
47
  "jest": "^30.4.2",
package/src/udl.js CHANGED
@@ -335,7 +335,11 @@ const udlToNpsState = (udlRow) => {
335
335
  const Xvel = _.get(udlRow, "xvel", null); // kilometers/second
336
336
  const Yvel = _.get(udlRow, "yvel", null);
337
337
  const Zvel = _.get(udlRow, "zvel", null);
338
- const cov = _.get(udlRow, "cov", null );
338
+ const rawCov = _.get(udlRow, "cov", null );
339
+ // Guard against providers returning a non-array `cov` (e.g. the string "null" or "OTHER"
340
+ // in place of a real covariance matrix). Only ever serialize a real array or null, so the
341
+ // Covariance column always holds valid JSON that downstream JSON-array parsers can read.
342
+ const cov = Array.isArray(rawCov) ? rawCov : null;
339
343
  const covRefFrame = _.get(udlRow, "covReferenceFrame", null );
340
344
  let keplerians = {a: null, e: null, i: null, raan: null, w: null, f: null};
341
345