@newrelic/browser-agent 1.299.0-rc.5 → 1.299.0-rc.6

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.299.0-rc.5";
20
+ const VERSION = exports.VERSION = "1.299.0-rc.6";
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.299.0-rc.5";
20
+ const VERSION = exports.VERSION = "1.299.0-rc.6";
21
21
 
22
22
  /**
23
23
  * Exposes the build type of the agent
@@ -202,12 +202,14 @@ class ApiBase {
202
202
  /**
203
203
  * Returns a new API object that is bound to the current SPA interaction.
204
204
  * {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/interaction/}
205
+ * @param {Object} [opts] Options to configure the new or existing interaction with
206
+ * @param {boolean} [opts.waitForEnd=false] To forcibly keep the interaction open until the `.end` method is called on its handle, set to true. Defaults to false. After an interaction is earmarked with this, it cannot be undone.
205
207
  * @returns {InteractionInstance} An API object that is bound to a specific BrowserInteraction event. Each time this method is called for the same BrowserInteraction, a new object is created, but it still references the same interaction.
206
208
  * - Note: Does not apply to MicroAgent
207
209
  * - Deprecation Notice: interaction.createTracer is deprecated. See https://docs.newrelic.com/eol/2024/04/eol-04-24-24-createtracer/ for more information.
208
210
  */
209
- interaction() {
210
- return this.#callMethod(_constants.INTERACTION);
211
+ interaction(opts) {
212
+ return this.#callMethod(_constants.INTERACTION, opts);
211
213
  }
212
214
 
213
215
  /**
@@ -11,7 +11,7 @@
11
11
  /**
12
12
  * Exposes the version of the agent
13
13
  */
14
- export const VERSION = "1.299.0-rc.5";
14
+ export const VERSION = "1.299.0-rc.6";
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.299.0-rc.5";
14
+ export const VERSION = "1.299.0-rc.6";
15
15
 
16
16
  /**
17
17
  * Exposes the build type of the agent
@@ -196,12 +196,14 @@ export class ApiBase {
196
196
  /**
197
197
  * Returns a new API object that is bound to the current SPA interaction.
198
198
  * {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/interaction/}
199
+ * @param {Object} [opts] Options to configure the new or existing interaction with
200
+ * @param {boolean} [opts.waitForEnd=false] To forcibly keep the interaction open until the `.end` method is called on its handle, set to true. Defaults to false. After an interaction is earmarked with this, it cannot be undone.
199
201
  * @returns {InteractionInstance} An API object that is bound to a specific BrowserInteraction event. Each time this method is called for the same BrowserInteraction, a new object is created, but it still references the same interaction.
200
202
  * - Note: Does not apply to MicroAgent
201
203
  * - Deprecation Notice: interaction.createTracer is deprecated. See https://docs.newrelic.com/eol/2024/04/eol-04-24-24-createtracer/ for more information.
202
204
  */
203
- interaction() {
204
- return this.#callMethod(INTERACTION);
205
+ interaction(opts) {
206
+ return this.#callMethod(INTERACTION, opts);
205
207
  }
206
208
 
207
209
  /**
@@ -147,11 +147,15 @@ export class ApiBase {
147
147
  /**
148
148
  * Returns a new API object that is bound to the current SPA interaction.
149
149
  * {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/interaction/}
150
+ * @param {Object} [opts] Options to configure the new or existing interaction with
151
+ * @param {boolean} [opts.waitForEnd=false] To forcibly keep the interaction open until the `.end` method is called on its handle, set to true. Defaults to false. After an interaction is earmarked with this, it cannot be undone.
150
152
  * @returns {InteractionInstance} An API object that is bound to a specific BrowserInteraction event. Each time this method is called for the same BrowserInteraction, a new object is created, but it still references the same interaction.
151
153
  * - Note: Does not apply to MicroAgent
152
154
  * - Deprecation Notice: interaction.createTracer is deprecated. See https://docs.newrelic.com/eol/2024/04/eol-04-24-24-createtracer/ for more information.
153
155
  */
154
- interaction(): InteractionInstance;
156
+ interaction(opts?: {
157
+ waitForEnd?: boolean | undefined;
158
+ }): InteractionInstance;
155
159
  /**
156
160
  * Wrap a logger function to capture a log each time the function is invoked with the message and arguments passed
157
161
  * {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/wraplogger/}
@@ -1 +1 @@
1
- {"version":3,"file":"api-base.d.ts","sourceRoot":"","sources":["../../../src/loaders/api-base.js"],"names":[],"mappings":"AAOA;;GAEG;AACH;IAQE;;;;;OAKG;IACH,oBAHW,MAAM,eACN,MAAM,OAIhB;IAED;;;;;;;;;;;OAWG;IACH,iBALG;QAAuB,UAAU,EAAzB,MAAM;QACS,aAAa,EAA5B,MAAM;QACU,UAAU,GAA1B,MAAM,YAAC;KACf,GAAU,MAAM,CAIlB;IAED;;;;;OAKG;IACH,6BAHW,MAAM,eACN,MAAM,OAIhB;IAED;;;;;OAKG;IACH,sBAHW,MAAM,SACN,MAAM,OAIhB;IAED;;;;;;OAMG;IACH,yBAJW,MAAM,SACN,MAAM,GAAC,MAAM,GAAC,OAAO,GAAC,IAAI,YAC1B,OAAO,OAIjB;IAED;;;;;OAKG;IACH,mBAHW,KAAK,GAAC,MAAM,qBACZ,MAAM,OAIhB;IAED;;;;OAIG;IACH,iBAFW,MAAM,GAAC,IAAI,OAIrB;IAED;;;;;;;OAOG;IACH,6BAJW,MAAM,GAAC,IAAI,OAMrB;IAED;;;;OAIG;IACH,0BAFW,CAAC,KAAK,EAAE,KAAK,GAAC,MAAM,KAAK,OAAO,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,OAI9D;IAED;;;;;OAKG;IACH,iBAHW,MAAM,MACN,MAAM,OAIhB;IAED;;;;;MAKE;IACF,aAHW,MAAM,YACN;QAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,GAAC,OAA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AE,OAAO,GAAC,OAAO,GAAC,OAAO,GAAC,MAAM,GAAC,MAAM,CAAA;KAAC,OAIpF;IAED;;;;;;OAMG;IACH,cAJW,MAAM,WACN,MAAM,OAAC,GACL;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAA;KAAC,CAIpF;;CACF;kCA9NY,OAAO,yBAAyB,EAAE,mBAAmB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newrelic/browser-agent",
3
- "version": "1.299.0-rc.5",
3
+ "version": "1.299.0-rc.6",
4
4
  "private": false,
5
5
  "author": "New Relic Browser Agent Team <browser-agent@newrelic.com>",
6
6
  "description": "New Relic Browser Agent",
@@ -187,7 +187,7 @@
187
187
  "test": " NODE_OPTIONS=--max-old-space-size=8192 jest",
188
188
  "test:unit": "jest --selectProjects unit",
189
189
  "test:component": "jest --selectProjects component",
190
- "test:types": "tsd -f ./tests/dts/**/*.ts",
190
+ "test:types": "npm run npm:build:types && tsd -f ./tests/dts/**/*.ts",
191
191
  "wdio": "node --max-old-space-size=8192 tools/wdio/bin/cli.js",
192
192
  "wdio:smoke": "node --max-old-space-size=8192 tools/wdio/bin/cli.js -T --concurrent=30",
193
193
  "build:all": "npm run cdn:build:local && npm run build:npm && npm run tools:test-builds",
@@ -197,12 +197,14 @@ export class ApiBase {
197
197
  /**
198
198
  * Returns a new API object that is bound to the current SPA interaction.
199
199
  * {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/interaction/}
200
+ * @param {Object} [opts] Options to configure the new or existing interaction with
201
+ * @param {boolean} [opts.waitForEnd=false] To forcibly keep the interaction open until the `.end` method is called on its handle, set to true. Defaults to false. After an interaction is earmarked with this, it cannot be undone.
200
202
  * @returns {InteractionInstance} An API object that is bound to a specific BrowserInteraction event. Each time this method is called for the same BrowserInteraction, a new object is created, but it still references the same interaction.
201
203
  * - Note: Does not apply to MicroAgent
202
204
  * - Deprecation Notice: interaction.createTracer is deprecated. See https://docs.newrelic.com/eol/2024/04/eol-04-24-24-createtracer/ for more information.
203
205
  */
204
- interaction () {
205
- return this.#callMethod(INTERACTION)
206
+ interaction (opts) {
207
+ return this.#callMethod(INTERACTION, opts)
206
208
  }
207
209
 
208
210
  /**