@newrelic/browser-agent 1.299.0-rc.4 → 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.
@@ -27,8 +27,6 @@ const InitModelFn = () => {
27
27
  const hiddenState = {
28
28
  feature_flags: [],
29
29
  experimental: {
30
- marks: false,
31
- measures: false,
32
30
  resources: false
33
31
  },
34
32
  mask_selector: '*',
@@ -109,18 +107,8 @@ const InitModelFn = () => {
109
107
  autoStart: true
110
108
  },
111
109
  performance: {
112
- get capture_marks() {
113
- return hiddenState.feature_flags.includes(_constants.FEATURE_FLAGS.MARKS) || hiddenState.experimental.marks;
114
- },
115
- set capture_marks(val) {
116
- hiddenState.experimental.marks = val;
117
- },
118
- get capture_measures() {
119
- return hiddenState.feature_flags.includes(_constants.FEATURE_FLAGS.MEASURES) || hiddenState.experimental.measures;
120
- },
121
- set capture_measures(val) {
122
- hiddenState.experimental.measures = val;
123
- },
110
+ capture_marks: false,
111
+ capture_measures: false,
124
112
  capture_detail: true,
125
113
  resources: {
126
114
  get enabled() {
@@ -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.4";
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.4";
20
+ const VERSION = exports.VERSION = "1.299.0-rc.6";
21
21
 
22
22
  /**
23
23
  * Exposes the build type of the agent
@@ -18,7 +18,5 @@ const RAGE_CLICK_THRESHOLD_MS = exports.RAGE_CLICK_THRESHOLD_MS = 1000;
18
18
  const FRUSTRATION_TIMEOUT_MS = exports.FRUSTRATION_TIMEOUT_MS = 2000;
19
19
  const RESERVED_EVENT_TYPES = exports.RESERVED_EVENT_TYPES = ['PageAction', 'UserAction', 'BrowserPerformance'];
20
20
  const FEATURE_FLAGS = exports.FEATURE_FLAGS = {
21
- MARKS: 'experimental.marks',
22
- MEASURES: 'experimental.measures',
23
21
  RESOURCES: 'experimental.resources'
24
22
  };
@@ -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
  /**
@@ -21,8 +21,6 @@ const InitModelFn = () => {
21
21
  const hiddenState = {
22
22
  feature_flags: [],
23
23
  experimental: {
24
- marks: false,
25
- measures: false,
26
24
  resources: false
27
25
  },
28
26
  mask_selector: '*',
@@ -103,18 +101,8 @@ const InitModelFn = () => {
103
101
  autoStart: true
104
102
  },
105
103
  performance: {
106
- get capture_marks() {
107
- return hiddenState.feature_flags.includes(FEATURE_FLAGS.MARKS) || hiddenState.experimental.marks;
108
- },
109
- set capture_marks(val) {
110
- hiddenState.experimental.marks = val;
111
- },
112
- get capture_measures() {
113
- return hiddenState.feature_flags.includes(FEATURE_FLAGS.MEASURES) || hiddenState.experimental.measures;
114
- },
115
- set capture_measures(val) {
116
- hiddenState.experimental.measures = val;
117
- },
104
+ capture_marks: false,
105
+ capture_measures: false,
118
106
  capture_detail: true,
119
107
  resources: {
120
108
  get enabled() {
@@ -11,7 +11,7 @@
11
11
  /**
12
12
  * Exposes the version of the agent
13
13
  */
14
- export const VERSION = "1.299.0-rc.4";
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.4";
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,5 @@ export const RAGE_CLICK_THRESHOLD_MS = 1000;
11
11
  export const FRUSTRATION_TIMEOUT_MS = 2000;
12
12
  export const RESERVED_EVENT_TYPES = ['PageAction', 'UserAction', 'BrowserPerformance'];
13
13
  export const FEATURE_FLAGS = {
14
- MARKS: 'experimental.marks',
15
- MEASURES: 'experimental.measures',
16
14
  RESOURCES: 'experimental.resources'
17
15
  };
@@ -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
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/common/config/init.js"],"names":[],"mappings":"AAgJO,0CAEN;mBAvIY,OAAO,cAAc,EAAE,IAAI"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/common/config/init.js"],"names":[],"mappings":"AA4IO,0CAEN;mBAnIY,OAAO,cAAc,EAAE,IAAI"}
@@ -6,8 +6,6 @@ export const RAGE_CLICK_THRESHOLD_MS: 1000;
6
6
  export const FRUSTRATION_TIMEOUT_MS: 2000;
7
7
  export const RESERVED_EVENT_TYPES: string[];
8
8
  export namespace FEATURE_FLAGS {
9
- let MARKS: string;
10
- let MEASURES: string;
11
9
  let RESOURCES: string;
12
10
  }
13
11
  //# sourceMappingURL=constants.d.ts.map
@@ -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,OAAO,GAAC,OAAO,GAAC,MAAM,GAAC,MAAM,CAAA;KAAC,OAIpF;IAED;;;OAGG;IACH,aAEC;IAED;;;;OAIG;IACH,qBAFW,MAAM,OAIhB;IAED;;;;OAIG;IACH,oBAEC;IAED;;;;;OAKG;IACH,mBAEC;IAED;;;;;;;;;;OAUG;IACH,6BARW;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC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F;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.4",
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",
@@ -21,8 +21,6 @@ const InitModelFn = () => {
21
21
  const hiddenState = {
22
22
  feature_flags: [],
23
23
  experimental: {
24
- marks: false,
25
- measures: false,
26
24
  resources: false
27
25
  },
28
26
  mask_selector: '*',
@@ -72,10 +70,8 @@ const InitModelFn = () => {
72
70
  page_view_event: { enabled: true, autoStart: true },
73
71
  page_view_timing: { enabled: true, autoStart: true },
74
72
  performance: {
75
- get capture_marks () { return hiddenState.feature_flags.includes(FEATURE_FLAGS.MARKS) || hiddenState.experimental.marks },
76
- set capture_marks (val) { hiddenState.experimental.marks = val },
77
- get capture_measures () { return hiddenState.feature_flags.includes(FEATURE_FLAGS.MEASURES) || hiddenState.experimental.measures },
78
- set capture_measures (val) { hiddenState.experimental.measures = val },
73
+ capture_marks: false,
74
+ capture_measures: false,
79
75
  capture_detail: true,
80
76
  resources: {
81
77
  get enabled () { return hiddenState.feature_flags.includes(FEATURE_FLAGS.RESOURCES) || hiddenState.experimental.resources },
@@ -17,7 +17,5 @@ export const FRUSTRATION_TIMEOUT_MS = 2000
17
17
  export const RESERVED_EVENT_TYPES = ['PageAction', 'UserAction', 'BrowserPerformance']
18
18
 
19
19
  export const FEATURE_FLAGS = {
20
- MARKS: 'experimental.marks',
21
- MEASURES: 'experimental.measures',
22
20
  RESOURCES: 'experimental.resources'
23
21
  }
@@ -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
  /**