@newrelic/browser-agent 1.296.0-rc.2 → 1.296.0-rc.3

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.
@@ -17,7 +17,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.DIST_METHOD = exports.BUILD_EN
17
17
  /**
18
18
  * Exposes the version of the agent
19
19
  */
20
- const VERSION = exports.VERSION = "1.296.0-rc.2";
20
+ const VERSION = exports.VERSION = "1.296.0-rc.3";
21
21
 
22
22
  /**
23
23
  * Exposes the build type of the agent
@@ -17,7 +17,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.DIST_METHOD = exports.BUILD_EN
17
17
  /**
18
18
  * Exposes the version of the agent
19
19
  */
20
- const VERSION = exports.VERSION = "1.296.0-rc.2";
20
+ const VERSION = exports.VERSION = "1.296.0-rc.3";
21
21
 
22
22
  /**
23
23
  * Exposes the build type of the agent
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.Harvester = void 0;
7
+ exports.send = send;
7
8
  var _constants = require("../../features/metrics/constants");
8
9
  var _features = require("../../loaders/features/features");
9
10
  var _env = require("../constants/env.npm");
@@ -252,7 +253,7 @@ function send(agentRef, {
252
253
  function cleanPayload(payload = {}) {
253
254
  const clean = input => {
254
255
  if (typeof Uint8Array !== 'undefined' && input instanceof Uint8Array || Array.isArray(input)) return input;
255
- if (typeof input === 'string') return input.length > 0 ? input : null;
256
+ if (typeof input === 'string') return input;
256
257
  return Object.entries(input || {}).reduce((accumulator, [key, value]) => {
257
258
  if (typeof value === 'number' || typeof value === 'string' && value.length > 0 || typeof value === 'object' && Object.keys(value || {}).length > 0) {
258
259
  accumulator[key] = value;
@@ -11,7 +11,7 @@
11
11
  /**
12
12
  * Exposes the version of the agent
13
13
  */
14
- export const VERSION = "1.296.0-rc.2";
14
+ export const VERSION = "1.296.0-rc.3";
15
15
 
16
16
  /**
17
17
  * Exposes the build type of the agent
@@ -11,7 +11,7 @@
11
11
  /**
12
12
  * Exposes the version of the agent
13
13
  */
14
- export const VERSION = "1.296.0-rc.2";
14
+ export const VERSION = "1.296.0-rc.3";
15
15
 
16
16
  /**
17
17
  * Exposes the build type of the agent
@@ -112,7 +112,7 @@ const warnings = {};
112
112
  * @param {NetworkSendSpec} param0 Specification for sending data
113
113
  * @returns {boolean} True if a network call was made. Note that this does not mean or guarantee that it was successful.
114
114
  */
115
- function send(agentRef, {
115
+ export function send(agentRef, {
116
116
  endpoint,
117
117
  targetApp,
118
118
  payload,
@@ -245,7 +245,7 @@ function send(agentRef, {
245
245
  function cleanPayload(payload = {}) {
246
246
  const clean = input => {
247
247
  if (typeof Uint8Array !== 'undefined' && input instanceof Uint8Array || Array.isArray(input)) return input;
248
- if (typeof input === 'string') return input.length > 0 ? input : null;
248
+ if (typeof input === 'string') return input;
249
249
  return Object.entries(input || {}).reduce((accumulator, [key, value]) => {
250
250
  if (typeof value === 'number' || typeof value === 'string' && value.length > 0 || typeof value === 'object' && Object.keys(value || {}).length > 0) {
251
251
  accumulator[key] = value;
@@ -1,3 +1,18 @@
1
+ /**
2
+ * Initiate a harvest call.
3
+ * @param {NetworkSendSpec} param0 Specification for sending data
4
+ * @returns {boolean} True if a network call was made. Note that this does not mean or guarantee that it was successful.
5
+ */
6
+ export function send(agentRef: any, { endpoint, targetApp, payload, localOpts, submitMethod, cbFinished, raw, featureName }: {
7
+ endpoint: any;
8
+ targetApp: any;
9
+ payload: any;
10
+ localOpts?: {} | undefined;
11
+ submitMethod: any;
12
+ cbFinished: any;
13
+ raw: any;
14
+ featureName: any;
15
+ }): boolean;
1
16
  export class Harvester {
2
17
  constructor(agentRef: any);
3
18
  initializedAggregates: any[];
@@ -1 +1 @@
1
- {"version":3,"file":"harvester.d.ts","sourceRoot":"","sources":["../../../../src/common/harvest/harvester.js"],"names":[],"mappings":"AAuBA;IAIE,2BAUC;IAZD,6BAA0B;IAGxB,cAAwB;IAW1B,wCASC;IAED;;;;;OAKG;IACH,iCAJW,MAAM,cACN,MAAM,GACJ,OAAO,CA+CnB;;CACF;8BAGY,OAAO,YAAY,EAAE,eAAe"}
1
+ {"version":3,"file":"harvester.d.ts","sourceRoot":"","sources":["../../../../src/common/harvest/harvester.js"],"names":[],"mappings":"AA6GA;;;;IAII;AACJ;;;;;;;;;IAFc,OAAO,CA+FpB;AAxLD;IAIE,2BAUC;IAZD,6BAA0B;IAGxB,cAAwB;IAW1B,wCASC;IAED;;;;;OAKG;IACH,iCAJW,MAAM,cACN,MAAM,GACJ,OAAO,CA+CnB;;CACF;8BAGY,OAAO,YAAY,EAAE,eAAe"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newrelic/browser-agent",
3
- "version": "1.296.0-rc.2",
3
+ "version": "1.296.0-rc.3",
4
4
  "private": false,
5
5
  "author": "New Relic Browser Agent Team <browser-agent@newrelic.com>",
6
6
  "description": "New Relic Browser Agent",
@@ -112,7 +112,7 @@ const warnings = {}
112
112
  * @param {NetworkSendSpec} param0 Specification for sending data
113
113
  * @returns {boolean} True if a network call was made. Note that this does not mean or guarantee that it was successful.
114
114
  */
115
- function send (agentRef, { endpoint, targetApp, payload, localOpts = {}, submitMethod, cbFinished, raw, featureName }) {
115
+ export function send (agentRef, { endpoint, targetApp, payload, localOpts = {}, submitMethod, cbFinished, raw, featureName }) {
116
116
  if (!agentRef.info.errorBeacon) return false
117
117
 
118
118
  let { body, qs } = cleanPayload(payload)
@@ -218,7 +218,7 @@ function send (agentRef, { endpoint, targetApp, payload, localOpts = {}, submitM
218
218
  function cleanPayload (payload = {}) {
219
219
  const clean = (input) => {
220
220
  if ((typeof Uint8Array !== 'undefined' && input instanceof Uint8Array) || Array.isArray(input)) return input
221
- if (typeof input === 'string') return input.length > 0 ? input : null
221
+ if (typeof input === 'string') return input
222
222
  return Object.entries(input || {}).reduce((accumulator, [key, value]) => {
223
223
  if ((typeof value === 'number') ||
224
224
  (typeof value === 'string' && value.length > 0) ||