@google/earthengine 1.6.15 → 1.7.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@google/earthengine",
3
- "version": "1.6.15",
3
+ "version": "1.7.1",
4
4
  "description": "JavaScript client for Google Earth Engine API.",
5
5
  "author": "Google LLC",
6
6
  "license": "Apache-2.0",
package/src/apiclient.js CHANGED
@@ -24,7 +24,7 @@ const {trustedResourceUrl} = goog.require('safevalues.index');
24
24
  /** @namespace */
25
25
  const apiclient = {};
26
26
 
27
- const API_CLIENT_VERSION = '1.6.15';
27
+ const API_CLIENT_VERSION = '1.7.1';
28
28
 
29
29
  exports.VERSION = apiVersion.VERSION;
30
30
  exports.API_CLIENT_VERSION = API_CLIENT_VERSION;
@@ -677,10 +677,15 @@ apiclient.setAppIdToken = function(token) {
677
677
 
678
678
  /**
679
679
  * Sets the user agent for API requests.
680
- * @param {string} userAgent The user agent string.
680
+ * @param {string} userAgent The user agent. This will be converted to a string
681
+ * and sanitized.
681
682
  */
682
683
  apiclient.setUserAgent = function(userAgent) {
683
- apiclient.userAgent_ = userAgent;
684
+ if (userAgent == null) {
685
+ apiclient.userAgent_ = null;
686
+ } else {
687
+ apiclient.userAgent_ = String(userAgent).replace(/[\r\n]/g, '');
688
+ }
684
689
  };
685
690
 
686
691