@newrelic/browser-agent 1.263.0 → 1.264.0

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 (210) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +2 -2
  3. package/dist/cjs/cdn/experimental.js +3 -7
  4. package/dist/cjs/cdn/pro.js +2 -2
  5. package/dist/cjs/cdn/spa.js +2 -2
  6. package/dist/cjs/common/aggregate/aggregator.js +3 -3
  7. package/dist/cjs/common/config/state/init.js +6 -3
  8. package/dist/cjs/common/constants/env.cdn.js +1 -1
  9. package/dist/cjs/common/constants/env.npm.js +1 -1
  10. package/dist/cjs/common/constants/runtime.js +1 -3
  11. package/dist/cjs/common/drain/drain.js +4 -4
  12. package/dist/cjs/common/harvest/harvest.js +2 -2
  13. package/dist/cjs/common/serialize/bel-serializer.js +2 -2
  14. package/dist/cjs/common/session/session-entity.js +1 -1
  15. package/dist/cjs/common/url/encode.js +3 -5
  16. package/dist/cjs/common/util/submit-data.js +0 -1
  17. package/dist/cjs/common/vitals/vital-metric.js +1 -1
  18. package/dist/cjs/features/ajax/aggregate/index.js +1 -1
  19. package/dist/cjs/features/ajax/instrument/index.js +1 -1
  20. package/dist/cjs/features/generic_events/aggregate/index.js +137 -0
  21. package/dist/cjs/features/generic_events/constants.js +8 -0
  22. package/dist/cjs/features/generic_events/index.js +12 -0
  23. package/dist/cjs/features/generic_events/instrument/index.js +27 -0
  24. package/dist/cjs/features/jserrors/aggregate/index.js +13 -12
  25. package/dist/cjs/features/jserrors/instrument/index.js +1 -1
  26. package/dist/cjs/features/logging/aggregate/index.js +1 -1
  27. package/dist/cjs/features/logging/instrument/index.js +1 -1
  28. package/dist/cjs/features/metrics/aggregate/index.js +1 -1
  29. package/dist/cjs/features/metrics/instrument/index.js +1 -1
  30. package/dist/cjs/features/page_action/instrument/index.js +6 -6
  31. package/dist/cjs/features/page_view_event/aggregate/index.js +1 -1
  32. package/dist/cjs/features/page_view_event/aggregate/initialized-features.js +1 -1
  33. package/dist/cjs/features/page_view_event/instrument/index.js +1 -1
  34. package/dist/cjs/features/page_view_timing/aggregate/index.js +3 -3
  35. package/dist/cjs/features/page_view_timing/instrument/index.js +1 -1
  36. package/dist/cjs/features/session_replay/aggregate/index.js +2 -2
  37. package/dist/cjs/features/session_replay/instrument/index.js +1 -1
  38. package/dist/cjs/features/session_replay/shared/stylesheet-evaluator.js +1 -1
  39. package/dist/cjs/features/session_trace/aggregate/index.js +1 -1
  40. package/dist/cjs/features/session_trace/aggregate/trace/storage.js +2 -2
  41. package/dist/cjs/features/session_trace/instrument/index.js +1 -1
  42. package/dist/cjs/features/soft_navigations/aggregate/bel-node.js +1 -1
  43. package/dist/cjs/features/soft_navigations/aggregate/index.js +1 -1
  44. package/dist/cjs/features/soft_navigations/aggregate/interaction.js +5 -5
  45. package/dist/cjs/features/soft_navigations/instrument/index.js +1 -1
  46. package/dist/cjs/features/spa/aggregate/index.js +2 -3
  47. package/dist/cjs/features/spa/aggregate/interaction.js +2 -2
  48. package/dist/cjs/features/spa/aggregate/serializer.js +1 -2
  49. package/dist/cjs/features/spa/instrument/index.js +1 -1
  50. package/dist/cjs/features/utils/aggregate-base.js +2 -0
  51. package/dist/cjs/features/utils/lazy-feature-loader.js +2 -2
  52. package/dist/cjs/index.js +21 -0
  53. package/dist/cjs/loaders/agent-base.js +0 -4
  54. package/dist/cjs/loaders/api/api.js +1 -1
  55. package/dist/cjs/loaders/api/apiAsync.js +1 -1
  56. package/dist/cjs/loaders/browser-agent.js +4 -3
  57. package/dist/cjs/loaders/configure/configure.js +4 -3
  58. package/dist/cjs/loaders/features/features.js +8 -4
  59. package/dist/cjs/loaders/micro-agent.js +1 -1
  60. package/dist/esm/cdn/experimental.js +2 -5
  61. package/dist/esm/cdn/pro.js +2 -2
  62. package/dist/esm/cdn/spa.js +2 -2
  63. package/dist/esm/common/aggregate/aggregator.js +3 -3
  64. package/dist/esm/common/config/state/init.js +6 -3
  65. package/dist/esm/common/constants/env.cdn.js +1 -1
  66. package/dist/esm/common/constants/env.npm.js +1 -1
  67. package/dist/esm/common/constants/runtime.js +0 -2
  68. package/dist/esm/common/drain/drain.js +4 -4
  69. package/dist/esm/common/harvest/harvest.js +3 -3
  70. package/dist/esm/common/serialize/bel-serializer.js +2 -2
  71. package/dist/esm/common/session/session-entity.js +2 -2
  72. package/dist/esm/common/url/encode.js +3 -5
  73. package/dist/esm/common/util/submit-data.js +0 -1
  74. package/dist/esm/common/vitals/vital-metric.js +1 -1
  75. package/dist/esm/features/ajax/aggregate/index.js +1 -1
  76. package/dist/esm/features/ajax/instrument/index.js +1 -1
  77. package/dist/esm/features/generic_events/aggregate/index.js +129 -0
  78. package/dist/esm/features/generic_events/constants.js +2 -0
  79. package/dist/esm/features/generic_events/index.js +1 -0
  80. package/dist/esm/features/generic_events/instrument/index.js +20 -0
  81. package/dist/esm/features/jserrors/aggregate/index.js +13 -12
  82. package/dist/esm/features/jserrors/instrument/index.js +1 -1
  83. package/dist/esm/features/logging/aggregate/index.js +1 -1
  84. package/dist/esm/features/logging/instrument/index.js +1 -1
  85. package/dist/esm/features/metrics/aggregate/index.js +1 -1
  86. package/dist/esm/features/metrics/instrument/index.js +1 -1
  87. package/dist/esm/features/page_action/instrument/index.js +7 -6
  88. package/dist/esm/features/page_view_event/aggregate/index.js +1 -1
  89. package/dist/esm/features/page_view_event/aggregate/initialized-features.js +1 -1
  90. package/dist/esm/features/page_view_event/instrument/index.js +1 -1
  91. package/dist/esm/features/page_view_timing/aggregate/index.js +3 -3
  92. package/dist/esm/features/page_view_timing/instrument/index.js +1 -1
  93. package/dist/esm/features/session_replay/aggregate/index.js +2 -2
  94. package/dist/esm/features/session_replay/instrument/index.js +1 -1
  95. package/dist/esm/features/session_replay/shared/stylesheet-evaluator.js +1 -1
  96. package/dist/esm/features/session_trace/aggregate/index.js +1 -1
  97. package/dist/esm/features/session_trace/aggregate/trace/storage.js +2 -2
  98. package/dist/esm/features/session_trace/instrument/index.js +1 -1
  99. package/dist/esm/features/soft_navigations/aggregate/bel-node.js +1 -1
  100. package/dist/esm/features/soft_navigations/aggregate/index.js +1 -1
  101. package/dist/esm/features/soft_navigations/aggregate/interaction.js +5 -5
  102. package/dist/esm/features/soft_navigations/instrument/index.js +1 -1
  103. package/dist/esm/features/spa/aggregate/index.js +2 -3
  104. package/dist/esm/features/spa/aggregate/interaction.js +2 -2
  105. package/dist/esm/features/spa/aggregate/serializer.js +1 -2
  106. package/dist/esm/features/spa/instrument/index.js +1 -1
  107. package/dist/esm/features/utils/aggregate-base.js +3 -1
  108. package/dist/esm/features/utils/lazy-feature-loader.js +2 -2
  109. package/dist/esm/index.js +3 -0
  110. package/dist/esm/loaders/agent-base.js +0 -4
  111. package/dist/esm/loaders/api/api.js +1 -1
  112. package/dist/esm/loaders/api/apiAsync.js +1 -1
  113. package/dist/esm/loaders/browser-agent.js +3 -2
  114. package/dist/esm/loaders/configure/configure.js +4 -3
  115. package/dist/esm/loaders/features/features.js +8 -4
  116. package/dist/esm/loaders/micro-agent.js +1 -1
  117. package/dist/types/common/aggregate/aggregator.d.ts.map +1 -1
  118. package/dist/types/common/config/state/init.d.ts.map +1 -1
  119. package/dist/types/common/constants/runtime.d.ts +0 -1
  120. package/dist/types/common/constants/runtime.d.ts.map +1 -1
  121. package/dist/types/common/drain/drain.d.ts.map +1 -1
  122. package/dist/types/common/serialize/bel-serializer.d.ts.map +1 -1
  123. package/dist/types/common/url/encode.d.ts.map +1 -1
  124. package/dist/types/common/util/submit-data.d.ts.map +1 -1
  125. package/dist/types/features/{page_action → generic_events}/aggregate/index.d.ts +7 -5
  126. package/dist/types/features/generic_events/aggregate/index.d.ts.map +1 -0
  127. package/dist/types/features/generic_events/constants.d.ts +2 -0
  128. package/dist/types/features/generic_events/constants.d.ts.map +1 -0
  129. package/dist/types/features/generic_events/index.d.ts +2 -0
  130. package/dist/types/features/generic_events/index.d.ts.map +1 -0
  131. package/dist/types/features/generic_events/instrument/index.d.ts +6 -0
  132. package/dist/types/features/generic_events/instrument/index.d.ts.map +1 -0
  133. package/dist/types/features/jserrors/aggregate/index.d.ts.map +1 -1
  134. package/dist/types/features/page_action/instrument/index.d.ts +5 -4
  135. package/dist/types/features/page_action/instrument/index.d.ts.map +1 -1
  136. package/dist/types/features/page_view_timing/aggregate/index.d.ts.map +1 -1
  137. package/dist/types/features/spa/aggregate/index.d.ts.map +1 -1
  138. package/dist/types/features/spa/aggregate/interaction.d.ts.map +1 -1
  139. package/dist/types/features/spa/aggregate/serializer.d.ts.map +1 -1
  140. package/dist/types/features/utils/aggregate-base.d.ts.map +1 -1
  141. package/dist/types/index.d.ts +3 -0
  142. package/dist/types/loaders/agent-base.d.ts +0 -1
  143. package/dist/types/loaders/agent-base.d.ts.map +1 -1
  144. package/dist/types/loaders/browser-agent.d.ts.map +1 -1
  145. package/dist/types/loaders/configure/configure.d.ts.map +1 -1
  146. package/dist/types/loaders/features/features.d.ts +1 -0
  147. package/dist/types/loaders/features/features.d.ts.map +1 -1
  148. package/package.json +25 -6
  149. package/src/cdn/experimental.js +2 -4
  150. package/src/cdn/pro.js +2 -2
  151. package/src/cdn/spa.js +2 -2
  152. package/src/common/aggregate/aggregator.js +2 -3
  153. package/src/common/config/state/init.js +2 -1
  154. package/src/common/constants/runtime.js +0 -2
  155. package/src/common/drain/drain.js +3 -4
  156. package/src/common/harvest/harvest.js +3 -3
  157. package/src/common/serialize/bel-serializer.js +1 -2
  158. package/src/common/session/session-entity.js +2 -2
  159. package/src/common/url/encode.js +2 -3
  160. package/src/common/util/submit-data.js +0 -1
  161. package/src/features/generic_events/aggregate/index.js +133 -0
  162. package/src/features/generic_events/constants.js +3 -0
  163. package/src/features/generic_events/index.js +1 -0
  164. package/src/features/generic_events/instrument/index.js +22 -0
  165. package/src/features/jserrors/aggregate/index.js +4 -5
  166. package/src/features/page_action/instrument/index.js +6 -6
  167. package/src/features/page_view_event/aggregate/initialized-features.js +1 -1
  168. package/src/features/page_view_timing/aggregate/index.js +1 -2
  169. package/src/features/spa/aggregate/index.js +1 -2
  170. package/src/features/spa/aggregate/interaction.js +1 -2
  171. package/src/features/spa/aggregate/serializer.js +1 -2
  172. package/src/features/utils/aggregate-base.js +3 -1
  173. package/src/features/utils/lazy-feature-loader.js +2 -2
  174. package/src/index.js +3 -0
  175. package/src/loaders/agent-base.js +0 -4
  176. package/src/loaders/api/api.js +1 -1
  177. package/src/loaders/api/apiAsync.js +1 -1
  178. package/src/loaders/browser-agent.js +5 -3
  179. package/src/loaders/configure/configure.js +5 -1
  180. package/src/loaders/features/features.js +8 -4
  181. package/src/loaders/micro-agent.js +1 -1
  182. package/dist/cjs/cdn/polyfills/lite.js +0 -16
  183. package/dist/cjs/cdn/polyfills/pro.js +0 -21
  184. package/dist/cjs/cdn/polyfills/spa.js +0 -22
  185. package/dist/cjs/cdn/polyfills.js +0 -24
  186. package/dist/cjs/common/util/map-own.js +0 -31
  187. package/dist/cjs/features/page_action/aggregate/index.js +0 -121
  188. package/dist/esm/cdn/polyfills/lite.js +0 -14
  189. package/dist/esm/cdn/polyfills/pro.js +0 -19
  190. package/dist/esm/cdn/polyfills/spa.js +0 -20
  191. package/dist/esm/cdn/polyfills.js +0 -27
  192. package/dist/esm/common/util/map-own.js +0 -24
  193. package/dist/esm/features/page_action/aggregate/index.js +0 -114
  194. package/dist/types/cdn/polyfills/lite.d.ts +0 -2
  195. package/dist/types/cdn/polyfills/lite.d.ts.map +0 -1
  196. package/dist/types/cdn/polyfills/pro.d.ts +0 -2
  197. package/dist/types/cdn/polyfills/pro.d.ts.map +0 -1
  198. package/dist/types/cdn/polyfills/spa.d.ts +0 -2
  199. package/dist/types/cdn/polyfills/spa.d.ts.map +0 -1
  200. package/dist/types/cdn/polyfills.d.ts +0 -2
  201. package/dist/types/cdn/polyfills.d.ts.map +0 -1
  202. package/dist/types/common/util/map-own.d.ts +0 -3
  203. package/dist/types/common/util/map-own.d.ts.map +0 -1
  204. package/dist/types/features/page_action/aggregate/index.d.ts.map +0 -1
  205. package/src/cdn/polyfills/lite.js +0 -20
  206. package/src/cdn/polyfills/pro.js +0 -30
  207. package/src/cdn/polyfills/spa.js +0 -32
  208. package/src/cdn/polyfills.js +0 -27
  209. package/src/common/util/map-own.js +0 -22
  210. package/src/features/page_action/aggregate/index.js +0 -114
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.264.0](https://github.com/newrelic/newrelic-browser-agent/compare/v1.263.0...v1.264.0) (2024-08-06)
7
+
8
+
9
+ ### Features
10
+
11
+ * Create generic events feature with 1,000 event limit ([#1121](https://github.com/newrelic/newrelic-browser-agent/issues/1121)) ([63ab04f](https://github.com/newrelic/newrelic-browser-agent/commit/63ab04fa9b2a0c347e175c9174f563e73767933b))
12
+ * Report Page Actions with Generic Events Feature ([#1124](https://github.com/newrelic/newrelic-browser-agent/issues/1124)) ([0d52acf](https://github.com/newrelic/newrelic-browser-agent/commit/0d52acf9eaa9a2c170459f03e9edad25375f4c1c))
13
+
6
14
  ## [1.263.0](https://github.com/newrelic/newrelic-browser-agent/compare/v1.262.0...v1.263.0) (2024-07-25)
7
15
 
8
16
 
package/README.md CHANGED
@@ -78,9 +78,9 @@ const options = {
78
78
  The following features may be disabled by adding `init` entries as shown above. Note that the `page_view_event` feature may not be disabled.
79
79
 
80
80
  - `ajax`
81
+ - `generic_events`
81
82
  - `jserrors`
82
83
  - `metrics`
83
- - `page_action`
84
84
  - `page_view_timing`
85
85
  - `session_replay`
86
86
  - `session_trace`
@@ -125,7 +125,7 @@ The following feature modules are available for inclusion in the `features` arra
125
125
  import { Ajax } from '@newrelic/browser-agent/features/ajax';
126
126
  import { JSErrors } from '@newrelic/browser-agent/features/jserrors';
127
127
  import { Metrics } from '@newrelic/browser-agent/features/metrics';
128
- import { PageAction } from '@newrelic/browser-agent/features/page_action';
128
+ import { GenericEvents } from '@newrelic/browser-agent/features/generic_events';
129
129
  import { PageViewEvent } from '@newrelic/browser-agent/features/page_view_event';
130
130
  import { PageViewTiming } from '@newrelic/browser-agent/features/page_view_timing';
131
131
  import { SessionTrace } from '@newrelic/browser-agent/features/session_trace';
@@ -8,8 +8,8 @@ var _instrument4 = require("../features/jserrors/instrument");
8
8
  var _instrument5 = require("../features/ajax/instrument");
9
9
  var _instrument6 = require("../features/session_trace/instrument");
10
10
  var _instrument7 = require("../features/session_replay/instrument");
11
- var _instrument8 = require("../features/soft_navigations/instrument");
12
- var _instrument9 = require("../features/page_action/instrument");
11
+ var _instrument8 = require("../features/generic_events/instrument");
12
+ var _instrument9 = require("../features/soft_navigations/instrument");
13
13
  var _instrument10 = require("../features/logging/instrument");
14
14
  /*
15
15
  * Copyright 2023 New Relic Corporation. All rights reserved.
@@ -22,11 +22,7 @@ var _instrument10 = require("../features/logging/instrument");
22
22
  * It is not production ready, and is not intended to be imported or implemented in any build of the browser agent
23
23
  */
24
24
 
25
- // import { Instrument as InstrumentSpa } from '../features/spa/instrument'
26
-
27
25
  new _agent.Agent({
28
- features: [_instrument5.Instrument, _instrument.Instrument, _instrument2.Instrument, _instrument6.Instrument, _instrument7.Instrument, _instrument3.Instrument, _instrument9.Instrument, _instrument4.Instrument, _instrument10.Instrument,
29
- // InstrumentSpa,
30
- _instrument8.Instrument],
26
+ features: [_instrument5.Instrument, _instrument.Instrument, _instrument2.Instrument, _instrument6.Instrument, _instrument7.Instrument, _instrument3.Instrument, _instrument4.Instrument, _instrument8.Instrument, _instrument10.Instrument, _instrument9.Instrument],
31
27
  loaderType: 'experimental'
32
28
  });
@@ -8,7 +8,7 @@ var _instrument4 = require("../features/jserrors/instrument");
8
8
  var _instrument5 = require("../features/ajax/instrument");
9
9
  var _instrument6 = require("../features/session_trace/instrument");
10
10
  var _instrument7 = require("../features/session_replay/instrument");
11
- var _instrument8 = require("../features/page_action/instrument");
11
+ var _instrument8 = require("../features/generic_events/instrument");
12
12
  var _instrument9 = require("../features/logging/instrument");
13
13
  /**
14
14
  * @file Creates a "Pro" agent loader bundle composed of the core Agent and all available feature modules except `spa`.
@@ -16,6 +16,6 @@ var _instrument9 = require("../features/logging/instrument");
16
16
  */
17
17
 
18
18
  new _agent.Agent({
19
- features: [_instrument.Instrument, _instrument2.Instrument, _instrument6.Instrument, _instrument7.Instrument, _instrument5.Instrument, _instrument3.Instrument, _instrument8.Instrument, _instrument4.Instrument, _instrument9.Instrument],
19
+ features: [_instrument.Instrument, _instrument2.Instrument, _instrument6.Instrument, _instrument7.Instrument, _instrument5.Instrument, _instrument3.Instrument, _instrument4.Instrument, _instrument8.Instrument, _instrument9.Instrument],
20
20
  loaderType: 'pro'
21
21
  });
@@ -10,14 +10,14 @@ var _instrument6 = require("../features/session_trace/instrument");
10
10
  var _instrument7 = require("../features/session_replay/instrument");
11
11
  var _instrument8 = require("../features/soft_navigations/instrument");
12
12
  var _instrument9 = require("../features/spa/instrument");
13
- var _instrument10 = require("../features/page_action/instrument");
13
+ var _instrument10 = require("../features/generic_events/instrument");
14
14
  var _instrument11 = require("../features/logging/instrument");
15
15
  /**
16
16
  * @file Creates a "SPA" agent loader bundle composed of the core agent and all available feature modules.
17
17
  */
18
18
 
19
19
  new _agent.Agent({
20
- features: [_instrument5.Instrument, _instrument.Instrument, _instrument2.Instrument, _instrument6.Instrument, _instrument7.Instrument, _instrument3.Instrument, _instrument10.Instrument, _instrument4.Instrument, _instrument11.Instrument, _instrument8.Instrument, _instrument9.Instrument // either the softnav or the old spa will be used (not both), but we still need to pack both to avoid dynamic import for instrument files
20
+ features: [_instrument5.Instrument, _instrument.Instrument, _instrument2.Instrument, _instrument6.Instrument, _instrument7.Instrument, _instrument3.Instrument, _instrument4.Instrument, _instrument10.Instrument, _instrument11.Instrument, _instrument8.Instrument, _instrument9.Instrument // either the softnav or the old spa will be used (not both), but we still need to pack both to avoid dynamic import for instrument files
21
21
  ],
22
22
  loaderType: 'spa'
23
23
  });
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.Aggregator = void 0;
7
7
  var _sharedContext = require("../context/shared-context");
8
- var _mapOwn = require("../util/map-own");
9
8
  /*
10
9
  * Copyright 2020 New Relic Corporation. All rights reserved.
11
10
  * SPDX-License-Identifier: Apache-2.0
@@ -36,7 +35,7 @@ class Aggregator extends _sharedContext.SharedContext {
36
35
  oldMetrics.count += metrics.count;
37
36
 
38
37
  // iterate through each new metric and merge
39
- (0, _mapOwn.mapOwn)(metrics, function (key, value) {
38
+ Object.keys(metrics || {}).forEach(key => {
40
39
  // count is a special case handled above
41
40
  if (key === 'count') return;
42
41
  var oldMetric = oldMetrics[key];
@@ -96,7 +95,8 @@ function aggregateMetrics(newMetrics, oldMetrics) {
96
95
  count: 0
97
96
  };
98
97
  oldMetrics.count += 1;
99
- (0, _mapOwn.mapOwn)(newMetrics, function (key, value) {
98
+ Object.entries(newMetrics || {}).forEach(_ref => {
99
+ let [key, value] = _ref;
100
100
  oldMetrics[key] = updateMetric(value, oldMetrics[key]);
101
101
  });
102
102
  return oldMetrics;
@@ -53,6 +53,11 @@ const model = () => {
53
53
  allowed_origins: undefined
54
54
  },
55
55
  feature_flags: [],
56
+ generic_events: {
57
+ enabled: true,
58
+ harvestTimeSeconds: 30,
59
+ autoStart: true
60
+ },
56
61
  harvest: {
57
62
  tooManyRequestsDelay: 60
58
63
  },
@@ -73,9 +78,7 @@ const model = () => {
73
78
  },
74
79
  obfuscate: undefined,
75
80
  page_action: {
76
- enabled: true,
77
- harvestTimeSeconds: 30,
78
- autoStart: true
81
+ enabled: true
79
82
  },
80
83
  page_view_event: {
81
84
  enabled: true,
@@ -12,7 +12,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.DIST_METHOD = exports.BUILD_EN
12
12
  /**
13
13
  * Exposes the version of the agent
14
14
  */
15
- const VERSION = exports.VERSION = "1.263.0";
15
+ const VERSION = exports.VERSION = "1.264.0";
16
16
 
17
17
  /**
18
18
  * Exposes the build type of the agent
@@ -12,7 +12,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.DIST_METHOD = exports.BUILD_EN
12
12
  /**
13
13
  * Exposes the version of the agent
14
14
  */
15
- const VERSION = exports.VERSION = "1.263.0";
15
+ const VERSION = exports.VERSION = "1.264.0";
16
16
 
17
17
  /**
18
18
  * Exposes the build type of the agent
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.supportsSendBeacon = exports.originTime = exports.loadedAsDeferredBrowserScript = exports.isiOS = exports.isWorkerScope = exports.isIE = exports.isBrowserScope = exports.initiallyHidden = exports.initialLocation = exports.iOSBelow16 = exports.globalScope = exports.ffVersion = void 0;
6
+ exports.supportsSendBeacon = exports.originTime = exports.loadedAsDeferredBrowserScript = exports.isiOS = exports.isWorkerScope = exports.isBrowserScope = exports.initiallyHidden = exports.initialLocation = exports.iOSBelow16 = exports.globalScope = exports.ffVersion = void 0;
7
7
  var _now = require("../timing/now");
8
8
  /**
9
9
  * @file Contains constants about the environment the agent is running
@@ -42,8 +42,6 @@ const ffVersion = exports.ffVersion = (() => {
42
42
  }
43
43
  return 0;
44
44
  })();
45
- const isIE = exports.isIE = Boolean(isBrowserScope && window.document.documentMode); // deprecated property that only works in IE
46
-
47
45
  const supportsSendBeacon = exports.supportsSendBeacon = !!globalScope.navigator?.sendBeacon;
48
46
 
49
47
  /**
@@ -7,7 +7,6 @@ exports.deregisterDrain = deregisterDrain;
7
7
  exports.drain = drain;
8
8
  exports.registerDrain = registerDrain;
9
9
  var _contextualEe = require("../event-emitter/contextual-ee");
10
- var _mapOwn = require("../util/map-own");
11
10
  var _registerHandler = require("../event-emitter/register-handler");
12
11
  var _features = require("../../loaders/features/features");
13
12
  /*
@@ -119,8 +118,9 @@ function drainGroup(agentIdentifier, group) {
119
118
  // eslint-disable-line no-unmodified-loop-condition
120
119
  emitEvent(bufferedEventsInGroup[i], groupHandlers);
121
120
  }
122
- (0, _mapOwn.mapOwn)(groupHandlers, function (eventType, handlerRegistrationList) {
123
- (0, _mapOwn.mapOwn)(handlerRegistrationList, function (i, registration) {
121
+ Object.entries(groupHandlers).forEach(_ref3 => {
122
+ let [eventType, handlerRegistrationList] = _ref3;
123
+ Object.values(handlerRegistrationList || {}).forEach(registration => {
124
124
  // registration is an array of: [targetEE, eventHandler]
125
125
  registration[0].on(eventType, registration[1]);
126
126
  });
@@ -141,7 +141,7 @@ function drainGroup(agentIdentifier, group) {
141
141
  */
142
142
  function emitEvent(evt, groupHandlers) {
143
143
  var type = evt[1];
144
- (0, _mapOwn.mapOwn)(groupHandlers[type], function (i, registration) {
144
+ Object.values(groupHandlers[type] || {}).forEach(registration => {
145
145
  var sourceEE = evt[0];
146
146
  var ee = registration[0];
147
147
  if (ee === sourceEE) {
@@ -171,11 +171,11 @@ class Harvest extends _sharedContext.SharedContext {
171
171
  /* Since workers don't support sendBeacon right now, they can only use XHR method.
172
172
  Because they still do permit synch XHR, the idea is that at final harvest time (worker is closing),
173
173
  we just make a BLOCKING request--trivial impact--with the remaining data as a temp fill-in for sendBeacon.
174
- Following the removal of img-element method, IE will also use sync XHR on page dismissal to ensure final analytics are sent. */
174
+ Following the removal of img-element method. */
175
175
  let result = submitMethod({
176
176
  url: fullUrl,
177
177
  body,
178
- sync: opts.unload && (_runtime.isWorkerScope || _runtime.isIE),
178
+ sync: opts.unload && _runtime.isWorkerScope,
179
179
  headers
180
180
  });
181
181
  if (!opts.unload && cbFinished && submitMethod === submitData.xhr) {
@@ -7,7 +7,6 @@ exports.addCustomAttributes = addCustomAttributes;
7
7
  exports.getAddStringContext = getAddStringContext;
8
8
  exports.nullable = nullable;
9
9
  exports.numeric = numeric;
10
- var _mapOwn = require("../util/map-own");
11
10
  var _stringify = require("../util/stringify");
12
11
  var _obfuscate = require("../util/obfuscate");
13
12
  /*
@@ -48,7 +47,8 @@ function getAddStringContext(agentIdentifier) {
48
47
  }
49
48
  function addCustomAttributes(attrs, addString) {
50
49
  var attrParts = [];
51
- (0, _mapOwn.mapOwn)(attrs, function (key, val) {
50
+ Object.entries(attrs || {}).forEach(_ref => {
51
+ let [key, val] = _ref;
52
52
  if (attrParts.length >= MAX_ATTRIBUTES) return;
53
53
  var type = 5;
54
54
  var serializedValue;
@@ -64,7 +64,7 @@ class SessionEntity {
64
64
  * if the event was spawned on the current page or an adjacent page, and the behavior tied
65
65
  * to storage events is critical to apply only to cross-tab behavior
66
66
  * */
67
- if (_runtime.isBrowserScope && !_runtime.isIE) {
67
+ if (_runtime.isBrowserScope) {
68
68
  (0, _eventListenerOpts.windowAddEventListener)('storage', event => {
69
69
  if (event.key === this.lookupKey) {
70
70
  const obj = typeof event.newValue === 'string' ? JSON.parse(event.newValue) : event.newValue;
@@ -7,7 +7,6 @@ exports.fromArray = fromArray;
7
7
  exports.obj = obj;
8
8
  exports.param = param;
9
9
  exports.qs = qs;
10
- var _mapOwn = require("../util/map-own");
11
10
  var _stringify = require("../util/stringify");
12
11
  /*
13
12
  * Copyright 2020 New Relic Corporation. All rights reserved.
@@ -23,9 +22,7 @@ var charMap = {
23
22
  '%24': '$',
24
23
  '%3B': ';'
25
24
  };
26
- var charList = (0, _mapOwn.mapOwn)(charMap, function (k) {
27
- return k;
28
- });
25
+ var charList = Object.keys(charMap);
29
26
  var safeEncoded = new RegExp(charList.join('|'), 'g');
30
27
  function real(c) {
31
28
  return charMap[c];
@@ -48,7 +45,8 @@ function fromArray(qs, maxBytes) {
48
45
  function obj(payload, maxBytes) {
49
46
  var total = 0;
50
47
  var result = '';
51
- (0, _mapOwn.mapOwn)(payload, function (feature, dataArray) {
48
+ Object.entries(payload || {}).forEach(_ref => {
49
+ let [feature, dataArray] = _ref;
52
50
  var intermediate = [];
53
51
  var next;
54
52
  var i;
@@ -30,7 +30,6 @@ function getSubmitMethod() {
30
30
  return isFinalHarvest && _runtime.isBrowserScope && _runtime.supportsSendBeacon
31
31
  // Use sendBeacon for final harvest
32
32
  ? beacon
33
- // Only IE does not support sendBeacon for final harvest
34
33
  // If not final harvest, or not browserScope, always use xhr post
35
34
  : xhr;
36
35
  }
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.VitalMetric = void 0;
7
7
  class VitalMetric {
8
- #subscribers = new Set();
8
+ #subscribers = (() => new Set())();
9
9
  history = [];
10
10
  constructor(name, roundingMethod) {
11
11
  this.name = name;
@@ -24,7 +24,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
24
24
  */
25
25
 
26
26
  class Aggregate extends _aggregateBase.AggregateBase {
27
- static featureName = _constants.FEATURE_NAME;
27
+ static featureName = (() => _constants.FEATURE_NAME)();
28
28
  #agentInfo;
29
29
  #agentRuntime;
30
30
  #agentInit;
@@ -30,7 +30,7 @@ var handlersLen = handlers.length;
30
30
  var origRequest = _config.originals.REQ;
31
31
  var origXHR = _config.originals.XHR;
32
32
  class Instrument extends _instrumentBase.InstrumentBase {
33
- static featureName = _constants.FEATURE_NAME;
33
+ static featureName = (() => _constants.FEATURE_NAME)();
34
34
  constructor(agentIdentifier, aggregator) {
35
35
  let auto = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
36
36
  super(agentIdentifier, aggregator, _constants.FEATURE_NAME, auto);
@@ -0,0 +1,137 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Aggregate = void 0;
7
+ var _stringify = require("../../../common/util/stringify");
8
+ var _harvestScheduler = require("../../../common/harvest/harvest-scheduler");
9
+ var _cleanUrl = require("../../../common/url/clean-url");
10
+ var _config = require("../../../common/config/config");
11
+ var _constants = require("../constants");
12
+ var _runtime = require("../../../common/constants/runtime");
13
+ var _aggregateBase = require("../../utils/aggregate-base");
14
+ var _console = require("../../../common/util/console");
15
+ var _now = require("../../../common/timing/now");
16
+ var _registerHandler = require("../../../common/event-emitter/register-handler");
17
+ var _drain = require("../../../common/drain/drain");
18
+ var _constants2 = require("../../metrics/constants");
19
+ /*
20
+ * Copyright 2020 New Relic Corporation. All rights reserved.
21
+ * SPDX-License-Identifier: Apache-2.0
22
+ */
23
+
24
+ class Aggregate extends _aggregateBase.AggregateBase {
25
+ #agentRuntime;
26
+ static featureName = (() => _constants.FEATURE_NAME)();
27
+ constructor(agentIdentifier, aggregator) {
28
+ var _this;
29
+ super(agentIdentifier, aggregator, _constants.FEATURE_NAME);
30
+ _this = this;
31
+ this.eventsPerHarvest = 1000;
32
+ this.harvestTimeSeconds = (0, _config.getConfigurationValue)(this.agentIdentifier, 'generic_events.harvestTimeSeconds');
33
+ this.referrerUrl = _runtime.isBrowserScope && document.referrer ? (0, _cleanUrl.cleanURL)(document.referrer) : undefined;
34
+ this.currentEvents = [];
35
+ this.events = [];
36
+ this.overflow = [];
37
+ this.#agentRuntime = (0, _config.getRuntime)(this.agentIdentifier);
38
+ this.waitForFlags(['ins']).then(_ref => {
39
+ let [ins] = _ref;
40
+ if (!ins) {
41
+ this.blocked = true;
42
+ (0, _drain.deregisterDrain)(this.agentIdentifier, this.featureName);
43
+ return;
44
+ }
45
+ if ((0, _config.getConfigurationValue)(this.agentIdentifier, 'page_action.enabled')) {
46
+ (0, _registerHandler.registerHandler)('api-addPageAction', (timestamp, name, attributes) => {
47
+ this.addEvent({
48
+ ...attributes,
49
+ eventType: 'PageAction',
50
+ timestamp: this.#agentRuntime.timeKeeper.convertRelativeTimestamp(timestamp),
51
+ timeSinceLoad: timestamp / 1000,
52
+ actionName: name,
53
+ referrerUrl: this.referrerUrl,
54
+ currentUrl: (0, _cleanUrl.cleanURL)('' + location),
55
+ ...(_runtime.isBrowserScope && {
56
+ browserWidth: window.document.documentElement?.clientWidth,
57
+ browserHeight: window.document.documentElement?.clientHeight
58
+ })
59
+ });
60
+ }, this.featureName, this.ee);
61
+ }
62
+ this.harvestScheduler = new _harvestScheduler.HarvestScheduler('ins', {
63
+ onFinished: function () {
64
+ return _this.onHarvestFinished(...arguments);
65
+ }
66
+ }, this);
67
+ this.harvestScheduler.harvest.on('ins', function () {
68
+ return _this.onHarvestStarted(...arguments);
69
+ });
70
+ this.harvestScheduler.startTimer(this.harvestTimeSeconds, 0);
71
+ this.drain();
72
+ });
73
+ }
74
+ onHarvestStarted(options) {
75
+ const {
76
+ userAttributes,
77
+ atts
78
+ } = (0, _config.getInfo)(this.agentIdentifier);
79
+ const harvestEvents = this.overflow.length ? this.overflow.splice(0, Infinity) : this.events.splice(0, Infinity);
80
+ var payload = {
81
+ qs: {
82
+ ua: userAttributes,
83
+ at: atts
84
+ },
85
+ body: {
86
+ ins: harvestEvents
87
+ }
88
+ };
89
+ if (options.retry) {
90
+ this.currentEvents = harvestEvents;
91
+ }
92
+ return payload;
93
+ }
94
+ onHarvestFinished(result) {
95
+ if (result && result.sent && result.retry && this.currentEvents.length) {
96
+ this.events = this.currentEvents.concat(this.events);
97
+ this.currentEvents = [];
98
+ }
99
+ }
100
+
101
+ // WARNING: Insights times are in seconds. EXCEPT timestamp, which is in ms.
102
+ addEvent() {
103
+ let obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
104
+ if (!obj || !Object.keys(obj).length) return;
105
+ if (!obj.eventType) {
106
+ (0, _console.warn)(44);
107
+ return;
108
+ }
109
+ for (let key in obj) {
110
+ let val = obj[key];
111
+ obj[key] = val && typeof val === 'object' ? (0, _stringify.stringify)(val) : val;
112
+ }
113
+ const defaultEventAttributes = {
114
+ /** should be overridden by the event-specific attributes, but just in case -- set it to now() */
115
+ timestamp: this.#agentRuntime.timeKeeper.convertRelativeTimestamp((0, _now.now)()),
116
+ /** all generic events require a pageUrl */
117
+ pageUrl: (0, _cleanUrl.cleanURL)((0, _config.getRuntime)(this.agentIdentifier).origin)
118
+ };
119
+ const eventAttributes = {
120
+ /** Agent-level custom attributes */
121
+ ...((0, _config.getInfo)(this.agentIdentifier).jsAttributes || {}),
122
+ /** Fallbacks for required properties in-case the event did not supply them, should take precedence over agent-level custom attrs */
123
+ ...defaultEventAttributes,
124
+ /** Event-specific attributes take precedence over agent-level custom attributes and fallbacks */
125
+ ...obj
126
+ };
127
+ this.events.push(eventAttributes);
128
+
129
+ // check if we've reached the harvest limit...
130
+ if (this.events.length >= this.eventsPerHarvest) {
131
+ this.ee.emit(_constants2.SUPPORTABILITY_METRIC_CHANNEL, ['GenericEvents/Harvest/Max/Seen']);
132
+ this.overflow = [...this.overflow, ...this.events.splice(0, Infinity)];
133
+ this.harvestScheduler.runHarvest();
134
+ }
135
+ }
136
+ }
137
+ exports.Aggregate = Aggregate;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.FEATURE_NAME = void 0;
7
+ var _features = require("../../loaders/features/features");
8
+ const FEATURE_NAME = exports.FEATURE_NAME = _features.FEATURE_NAMES.genericEvents;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "GenericEvents", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _index.Instrument;
10
+ }
11
+ });
12
+ var _index = require("./instrument/index");
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Instrument = void 0;
7
+ var _config = require("../../../common/config/config");
8
+ var _drain = require("../../../common/drain/drain");
9
+ var _instrumentBase = require("../../utils/instrument-base");
10
+ var _constants = require("../constants");
11
+ /* Copyright 2020 New Relic Corporation. All rights reserved.
12
+ * SPDX-License-Identifier: Apache-2.0
13
+ */
14
+
15
+ class Instrument extends _instrumentBase.InstrumentBase {
16
+ static featureName = (() => _constants.FEATURE_NAME)();
17
+ constructor(agentIdentifier, aggregator) {
18
+ let auto = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
19
+ super(agentIdentifier, aggregator, _constants.FEATURE_NAME, auto);
20
+ const genericEventSourceConfigs = [(0, _config.getConfigurationValue)(this.agentIdentifier, 'page_action.enabled')
21
+ // other future generic event source configs to go here, like M&Ms, PageResouce, etc.
22
+ ];
23
+ /** If any of the sources are active, import the aggregator. otherwise deregister */
24
+ if (genericEventSourceConfigs.some(x => x)) this.importAggregator();else (0, _drain.deregisterDrain)(this.agentIdentifier, this.featureName);
25
+ }
26
+ }
27
+ exports.Instrument = Instrument;
@@ -12,7 +12,6 @@ var _registerHandler = require("../../../common/event-emitter/register-handler")
12
12
  var _harvestScheduler = require("../../../common/harvest/harvest-scheduler");
13
13
  var _stringify = require("../../../common/util/stringify");
14
14
  var _handle = require("../../../common/event-emitter/handle");
15
- var _mapOwn = require("../../../common/util/map-own");
16
15
  var _config = require("../../../common/config/config");
17
16
  var _runtime = require("../../../common/constants/runtime");
18
17
  var _constants = require("../constants");
@@ -31,7 +30,7 @@ var _now = require("../../../common/timing/now");
31
30
  */
32
31
 
33
32
  class Aggregate extends _aggregateBase.AggregateBase {
34
- static featureName = _constants.FEATURE_NAME;
33
+ static featureName = (() => _constants.FEATURE_NAME)();
35
34
  constructor(agentIdentifier, aggregator) {
36
35
  var _this;
37
36
  super(agentIdentifier, aggregator, _constants.FEATURE_NAME);
@@ -100,7 +99,8 @@ class Aggregate extends _aggregateBase.AggregateBase {
100
99
  }
101
100
  onHarvestFinished(result) {
102
101
  if (result.retry && this.currentBody) {
103
- (0, _mapOwn.mapOwn)(this.currentBody, (key, value) => {
102
+ Object.entries(this.currentBody || {}).forEach(_ref2 => {
103
+ let [key, value] = _ref2;
104
104
  for (var i = 0; i < value.length; i++) {
105
105
  var bucket = value[i];
106
106
  var name = this.getBucketName(key, bucket.params, bucket.custom);
@@ -230,8 +230,8 @@ class Aggregate extends _aggregateBase.AggregateBase {
230
230
  let [type, bucketHash, params, newMetrics, localAttrs] = errorInfoArr;
231
231
  const allCustomAttrs = {};
232
232
  if (softNavOccurredFinished) {
233
- Object.entries(softNavCustomAttrs).forEach(_ref2 => {
234
- let [k, v] = _ref2;
233
+ Object.entries(softNavCustomAttrs).forEach(_ref3 => {
234
+ let [k, v] = _ref3;
235
235
  return setCustom(k, v);
236
236
  }); // when an ixn finishes, it'll include stuff in jsAttributes + attrs specific to the ixn
237
237
  bucketHash += params.browserInteractionId;
@@ -239,14 +239,14 @@ class Aggregate extends _aggregateBase.AggregateBase {
239
239
  delete params._softNavFinished;
240
240
  } else {
241
241
  // interaction was cancelled -> error should not be associated OR there was no interaction
242
- Object.entries((0, _config.getInfo)(this.agentIdentifier).jsAttributes).forEach(_ref3 => {
243
- let [k, v] = _ref3;
242
+ Object.entries((0, _config.getInfo)(this.agentIdentifier).jsAttributes).forEach(_ref4 => {
243
+ let [k, v] = _ref4;
244
244
  return setCustom(k, v);
245
245
  });
246
246
  delete params.browserInteractionId;
247
247
  }
248
- if (localAttrs) Object.entries(localAttrs).forEach(_ref4 => {
249
- let [k, v] = _ref4;
248
+ if (localAttrs) Object.entries(localAttrs).forEach(_ref5 => {
249
+ let [k, v] = _ref5;
250
250
  return setCustom(k, v);
251
251
  }); // local custom attrs are applied in either case with the highest precedence
252
252
 
@@ -264,8 +264,8 @@ class Aggregate extends _aggregateBase.AggregateBase {
264
264
  this.bufferedErrorsUnderSpa[interaction.id].forEach(item => {
265
265
  var allCustomAttrs = {};
266
266
  const localCustomAttrs = item[4];
267
- (0, _mapOwn.mapOwn)(interaction.root.attrs.custom, setCustom); // tack on custom attrs from the interaction
268
- (0, _mapOwn.mapOwn)(localCustomAttrs, setCustom);
267
+ Object.entries(interaction.root.attrs.custom || {}).forEach(setCustom); // tack on custom attrs from the interaction
268
+ Object.entries(localCustomAttrs || {}).forEach(setCustom);
269
269
  var params = item[2];
270
270
  if (wasSaved) {
271
271
  params.browserInteractionId = interaction.root.attrs.id;
@@ -277,7 +277,8 @@ class Aggregate extends _aggregateBase.AggregateBase {
277
277
  var jsAttributesHash = (0, _stringHashCode.stringHashCode)((0, _stringify.stringify)(allCustomAttrs));
278
278
  var aggregateHash = hash + ':' + jsAttributesHash;
279
279
  this.aggregator.store(item[0], aggregateHash, params, item[3], allCustomAttrs);
280
- function setCustom(key, val) {
280
+ function setCustom(_ref6) {
281
+ let [key, val] = _ref6;
281
282
  allCustomAttrs[key] = val && typeof val === 'object' ? (0, _stringify.stringify)(val) : val;
282
283
  }
283
284
  });
@@ -18,7 +18,7 @@ var _castError = require("../shared/cast-error");
18
18
  */
19
19
 
20
20
  class Instrument extends _instrumentBase.InstrumentBase {
21
- static featureName = _constants.FEATURE_NAME;
21
+ static featureName = (() => _constants.FEATURE_NAME)();
22
22
  #replayRunning = false;
23
23
  constructor(agentIdentifier, aggregator) {
24
24
  let auto = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
@@ -16,7 +16,7 @@ var _constants2 = require("../constants");
16
16
  var _log = require("../shared/log");
17
17
  var _utils = require("../shared/utils");
18
18
  class Aggregate extends _aggregateBase.AggregateBase {
19
- static featureName = _constants2.FEATURE_NAME;
19
+ static featureName = (() => _constants2.FEATURE_NAME)();
20
20
  #agentRuntime;
21
21
  #agentInfo;
22
22
  constructor(agentIdentifier, aggregator) {
@@ -8,7 +8,7 @@ var _instrumentBase = require("../../utils/instrument-base");
8
8
  var _constants = require("../constants");
9
9
  var _utils = require("../shared/utils");
10
10
  class Instrument extends _instrumentBase.InstrumentBase {
11
- static featureName = _constants.FEATURE_NAME;
11
+ static featureName = (() => _constants.FEATURE_NAME)();
12
12
  constructor(agentIdentifier, aggregator) {
13
13
  let auto = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
14
14
  super(agentIdentifier, aggregator, _constants.FEATURE_NAME, auto);
@@ -17,7 +17,7 @@ var _runtime = require("../../../common/constants/runtime");
17
17
  var _aggregateBase = require("../../utils/aggregate-base");
18
18
  var _drain = require("../../../common/drain/drain");
19
19
  class Aggregate extends _aggregateBase.AggregateBase {
20
- static featureName = _constants.FEATURE_NAME;
20
+ static featureName = (() => _constants.FEATURE_NAME)();
21
21
  constructor(agentIdentifier, aggregator) {
22
22
  super(agentIdentifier, aggregator, _constants.FEATURE_NAME);
23
23
  this.waitForFlags(['err']).then(_ref => {