Skip to content

Commit

Permalink
ci: check in dist folder
Browse files Browse the repository at this point in the history
  • Loading branch information
dtjones404 committed Feb 21, 2023
1 parent 3983c31 commit 466acdf
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 6 deletions.
13 changes: 11 additions & 2 deletions dist/beaver-logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -1104,6 +1104,7 @@
var url = _ref.url, prefix = _ref.prefix, _ref$logLevel = _ref.logLevel, logLevel = void 0 === _ref$logLevel ? DEFAULT_LOG_LEVEL : _ref$logLevel, _ref$transport = _ref.transport, transport = void 0 === _ref$transport ? getHTTPTransport() : _ref$transport, amplitudeApiKey = _ref.amplitudeApiKey, _ref$flushInterval = _ref.flushInterval, flushInterval = void 0 === _ref$flushInterval ? 6e4 : _ref$flushInterval, _ref$enableSendBeacon = _ref.enableSendBeacon, enableSendBeacon = void 0 !== _ref$enableSendBeacon && _ref$enableSendBeacon;
var events = [];
var tracking = [];
var metrics = [];
var payloadBuilders = [];
var metaBuilders = [];
var trackingBuilders = [];
Expand All @@ -1120,7 +1121,7 @@
}
function immediateFlush() {
return promise_ZalgoPromise.try((function() {
if (dom_isBrowser() && window.location.protocol !== constants_PROTOCOL.FILE && (events.length || tracking.length)) {
if (dom_isBrowser() && window.location.protocol !== constants_PROTOCOL.FILE && (events.length || tracking.length || metrics.length)) {
var meta = {};
for (var _i2 = 0; _i2 < metaBuilders.length; _i2++) extendIfDefined(meta, (0, metaBuilders[_i2])(meta));
var headers = {};
Expand All @@ -1134,7 +1135,8 @@
json: {
events: events,
meta: meta,
tracking: tracking
tracking: tracking,
metrics: metrics
},
enableSendBeacon: enableSendBeacon
}).catch(src_util_noop));
Expand All @@ -1155,6 +1157,7 @@
}).catch(src_util_noop);
events = [];
tracking = [];
metrics = [];
return promise_ZalgoPromise.resolve(res).then(src_util_noop);
}
}));
Expand Down Expand Up @@ -1243,6 +1246,12 @@
tracking.push(trackingPayload);
return logger;
},
metric: function(metricPayload) {
if (!dom_isBrowser()) return logger;
print(LOG_LEVEL.DEBUG, "metric." + metricPayload.name, metricPayload.dimensions);
metrics.push(metricPayload);
return logger;
},
flush: flush,
immediateFlush: immediateFlush,
addPayloadBuilder: function(builder) {
Expand Down
Loading

0 comments on commit 466acdf

Please sign in to comment.