@newrelic/browser-agent 1.299.0-rc.2 → 1.299.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.
- package/dist/cjs/common/constants/env.cdn.js +1 -1
- package/dist/cjs/common/constants/env.npm.js +1 -1
- package/dist/cjs/loaders/micro-agent.js +17 -1
- package/dist/esm/common/constants/env.cdn.js +1 -1
- package/dist/esm/common/constants/env.npm.js +1 -1
- package/dist/esm/loaders/micro-agent.js +17 -1
- package/dist/types/loaders/micro-agent.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/loaders/micro-agent.js +17 -1
|
@@ -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.
|
|
20
|
+
const VERSION = exports.VERSION = "1.299.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.299.0-rc.
|
|
20
|
+
const VERSION = exports.VERSION = "1.299.0-rc.3";
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Exposes the build type of the agent
|
|
@@ -97,7 +97,23 @@ class MicroAgent extends _microAgentBase.MicroAgentBase {
|
|
|
97
97
|
so as to avoid the race condition of things like session and sharedAggregator not being ready by features that uses them right away. */
|
|
98
98
|
nonAutoFeatures.forEach(f => {
|
|
99
99
|
if (enabledFeatures[f] && featureNames.includes(f)) {
|
|
100
|
-
|
|
100
|
+
let lazyImport;
|
|
101
|
+
/** Define these imports with static strings to not break tools like roll-up */
|
|
102
|
+
switch (f) {
|
|
103
|
+
case 'jserrors':
|
|
104
|
+
lazyImport = Promise.resolve().then(() => _interopRequireWildcard(require('../features/jserrors/aggregate')));
|
|
105
|
+
break;
|
|
106
|
+
case 'generic_events':
|
|
107
|
+
lazyImport = Promise.resolve().then(() => _interopRequireWildcard(require('../features/generic_events/aggregate')));
|
|
108
|
+
break;
|
|
109
|
+
case 'metrics':
|
|
110
|
+
lazyImport = Promise.resolve().then(() => _interopRequireWildcard(require('../features/metrics/aggregate')));
|
|
111
|
+
break;
|
|
112
|
+
case 'logging':
|
|
113
|
+
lazyImport = Promise.resolve().then(() => _interopRequireWildcard(require('../features/logging/aggregate')));
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
lazyImport.then(({
|
|
101
117
|
Aggregate
|
|
102
118
|
}) => {
|
|
103
119
|
this.features[f] = new Aggregate(this);
|
|
@@ -92,7 +92,23 @@ export class MicroAgent extends MicroAgentBase {
|
|
|
92
92
|
so as to avoid the race condition of things like session and sharedAggregator not being ready by features that uses them right away. */
|
|
93
93
|
nonAutoFeatures.forEach(f => {
|
|
94
94
|
if (enabledFeatures[f] && featureNames.includes(f)) {
|
|
95
|
-
|
|
95
|
+
let lazyImport;
|
|
96
|
+
/** Define these imports with static strings to not break tools like roll-up */
|
|
97
|
+
switch (f) {
|
|
98
|
+
case 'jserrors':
|
|
99
|
+
lazyImport = import('../features/jserrors/aggregate');
|
|
100
|
+
break;
|
|
101
|
+
case 'generic_events':
|
|
102
|
+
lazyImport = import('../features/generic_events/aggregate');
|
|
103
|
+
break;
|
|
104
|
+
case 'metrics':
|
|
105
|
+
lazyImport = import('../features/metrics/aggregate');
|
|
106
|
+
break;
|
|
107
|
+
case 'logging':
|
|
108
|
+
lazyImport = import('../features/logging/aggregate');
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
lazyImport.then(({
|
|
96
112
|
Aggregate
|
|
97
113
|
}) => {
|
|
98
114
|
this.features[f] = new Aggregate(this);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"micro-agent.d.ts","sourceRoot":"","sources":["../../../src/loaders/micro-agent.js"],"names":[],"mappings":"AAmCA;;;;;;;;GAQG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,SAAS,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"micro-agent.d.ts","sourceRoot":"","sources":["../../../src/loaders/micro-agent.js"],"names":[],"mappings":"AAmCA;;;;;;;;GAQG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,SAAS,EAAE,YAAY,EAsFxC;IAjFC,aAAkB;IAwBlB;;;;OAIG;IACH,uBAFW,MAAM,GAAC,MAAM,EAAE,aAmDzB;IAKH;;;;;MAOC;IAED,gBAEC;CACF;+BArI8B,oBAAoB"}
|
package/package.json
CHANGED
|
@@ -99,7 +99,23 @@ export class MicroAgent extends MicroAgentBase {
|
|
|
99
99
|
so as to avoid the race condition of things like session and sharedAggregator not being ready by features that uses them right away. */
|
|
100
100
|
nonAutoFeatures.forEach(f => {
|
|
101
101
|
if (enabledFeatures[f] && featureNames.includes(f)) {
|
|
102
|
-
|
|
102
|
+
let lazyImport
|
|
103
|
+
/** Define these imports with static strings to not break tools like roll-up */
|
|
104
|
+
switch (f) {
|
|
105
|
+
case 'jserrors':
|
|
106
|
+
lazyImport = import('../features/jserrors/aggregate')
|
|
107
|
+
break
|
|
108
|
+
case 'generic_events':
|
|
109
|
+
lazyImport = import('../features/generic_events/aggregate')
|
|
110
|
+
break
|
|
111
|
+
case 'metrics':
|
|
112
|
+
lazyImport = import('../features/metrics/aggregate')
|
|
113
|
+
break
|
|
114
|
+
case 'logging':
|
|
115
|
+
lazyImport = import('../features/logging/aggregate')
|
|
116
|
+
break
|
|
117
|
+
}
|
|
118
|
+
lazyImport.then(({ Aggregate }) => {
|
|
103
119
|
this.features[f] = new Aggregate(this)
|
|
104
120
|
this.runtime.harvester.initializedAggregates.push(this.features[f]) // so that harvester will poll this feature agg on interval
|
|
105
121
|
}).catch(err => warn(25, err))
|