Newer
Older
const onFID = (onReport) => {
const visibilityWatcher = (0,_lib_getVisibilityWatcher_js__WEBPACK_IMPORTED_MODULE_0__.getVisibilityWatcher)();
const metric = (0,_lib_initMetric_js__WEBPACK_IMPORTED_MODULE_1__.initMetric)('FID');
// eslint-disable-next-line prefer-const
let report;
const handleEntry = (entry) => {
// Only report if the page wasn't hidden prior to the first input.
if (entry.startTime < visibilityWatcher.firstHiddenTime) {
metric.value = entry.processingStart - entry.startTime;
metric.entries.push(entry);
report(true);
}
};
const handleEntries = (entries) => {
(entries ).forEach(handleEntry);
};
const po = (0,_lib_observe_js__WEBPACK_IMPORTED_MODULE_2__.observe)('first-input', handleEntries);
report = (0,_lib_bindReporter_js__WEBPACK_IMPORTED_MODULE_3__.bindReporter)(onReport, metric);
if (po) {
(0,_lib_onHidden_js__WEBPACK_IMPORTED_MODULE_4__.onHidden)(() => {
handleEntries(po.takeRecords() );
po.disconnect();
}, true);
}
};
//# sourceMappingURL=getFID.js.map
/***/ }),
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "_startChild": () => (/* binding */ _startChild),
/* harmony export */ "isMeasurementValue": () => (/* binding */ isMeasurementValue)
/* harmony export */ });
234045
234046
234047
234048
234049
234050
234051
234052
234053
234054
234055
234056
234057
234058
234059
234060
234061
234062
234063
234064
234065
234066
234067
234068
234069
234070
234071
234072
/**
* Checks if a given value is a valid measurement value.
*/
function isMeasurementValue(value) {
return typeof value === 'number' && isFinite(value);
}
/**
* Helper function to start child on transactions. This function will make sure that the transaction will
* use the start timestamp of the created child span if it is earlier than the transactions actual
* start timestamp.
*/
function _startChild(transaction, { startTimestamp, ...ctx }) {
if (startTimestamp && transaction.startTimestamp > startTimestamp) {
transaction.startTimestamp = startTimestamp;
}
return transaction.startChild({
startTimestamp,
...ctx,
});
}
//# sourceMappingURL=utils.js.map
/***/ }),
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "registerBackgroundTabDetection": () => (/* binding */ registerBackgroundTabDetection)
/* harmony export */ });
/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1528);
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1598);
/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1616);
/**
* Add a listener that cancels and finishes a transaction when the global
* document is hidden.
function registerBackgroundTabDetection() {
if (_types_js__WEBPACK_IMPORTED_MODULE_0__.WINDOW && _types_js__WEBPACK_IMPORTED_MODULE_0__.WINDOW.document) {
_types_js__WEBPACK_IMPORTED_MODULE_0__.WINDOW.document.addEventListener('visibilitychange', () => {
const activeTransaction = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.getActiveTransaction)() ;
if (_types_js__WEBPACK_IMPORTED_MODULE_0__.WINDOW.document.hidden && activeTransaction) {
const statusType = 'cancelled';
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
_sentry_utils__WEBPACK_IMPORTED_MODULE_2__.logger.log(
`[Tracing] Transaction: ${statusType} -> since tab moved to the background, op: ${activeTransaction.op}`,
);
// We should not set status if it is already set, this prevent important statuses like
// error or data loss from being overwritten on transaction.
if (!activeTransaction.status) {
activeTransaction.setStatus(statusType);
activeTransaction.setTag('visibilitychange', 'document.hidden');
activeTransaction.finish();
}
});
} else {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
_sentry_utils__WEBPACK_IMPORTED_MODULE_2__.logger.warn('[Tracing] Could not set up background tab detection due to lack of global document');
}
}
//# sourceMappingURL=backgroundtab.js.map
/***/ }),
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "SpanStatus": () => (/* binding */ SpanStatus)
/* harmony export */ });
234131
234132
234133
234134
234135
234136
234137
234138
234139
234140
234141
234142
234143
234144
234145
234146
234147
234148
234149
234150
234151
234152
234153
234154
234155
234156
234157
234158
234159
234160
234161
234162
234163
234164
234165
234166
234167
234168
234169
234170
234171
234172
234173
234174
234175
234176
234177
/** The status of an Span.
*
* @deprecated Use string literals - if you require type casting, cast to SpanStatusType type
*/
// eslint-disable-next-line import/export
var SpanStatus; (function (SpanStatus) {
/** The operation completed successfully. */
const Ok = 'ok'; SpanStatus["Ok"] = Ok;
/** Deadline expired before operation could complete. */
const DeadlineExceeded = 'deadline_exceeded'; SpanStatus["DeadlineExceeded"] = DeadlineExceeded;
/** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */
const Unauthenticated = 'unauthenticated'; SpanStatus["Unauthenticated"] = Unauthenticated;
/** 403 Forbidden */
const PermissionDenied = 'permission_denied'; SpanStatus["PermissionDenied"] = PermissionDenied;
/** 404 Not Found. Some requested entity (file or directory) was not found. */
const NotFound = 'not_found'; SpanStatus["NotFound"] = NotFound;
/** 429 Too Many Requests */
const ResourceExhausted = 'resource_exhausted'; SpanStatus["ResourceExhausted"] = ResourceExhausted;
/** Client specified an invalid argument. 4xx. */
const InvalidArgument = 'invalid_argument'; SpanStatus["InvalidArgument"] = InvalidArgument;
/** 501 Not Implemented */
const Unimplemented = 'unimplemented'; SpanStatus["Unimplemented"] = Unimplemented;
/** 503 Service Unavailable */
const Unavailable = 'unavailable'; SpanStatus["Unavailable"] = Unavailable;
/** Other/generic 5xx. */
const InternalError = 'internal_error'; SpanStatus["InternalError"] = InternalError;
/** Unknown. Any non-standard HTTP status code. */
const UnknownError = 'unknown_error'; SpanStatus["UnknownError"] = UnknownError;
/** The operation was cancelled (typically by the user). */
const Cancelled = 'cancelled'; SpanStatus["Cancelled"] = Cancelled;
/** Already exists (409) */
const AlreadyExists = 'already_exists'; SpanStatus["AlreadyExists"] = AlreadyExists;
/** Operation was rejected because the system is not in a state required for the operation's */
const FailedPrecondition = 'failed_precondition'; SpanStatus["FailedPrecondition"] = FailedPrecondition;
/** The operation was aborted, typically due to a concurrency issue. */
const Aborted = 'aborted'; SpanStatus["Aborted"] = Aborted;
/** Operation was attempted past the valid range. */
const OutOfRange = 'out_of_range'; SpanStatus["OutOfRange"] = OutOfRange;
/** Unrecoverable data loss or corruption */
const DataLoss = 'data_loss'; SpanStatus["DataLoss"] = DataLoss;
})(SpanStatus || (SpanStatus = {}));
//# sourceMappingURL=spanstatus.js.map
/***/ }),
module.exports = JSON.parse('{"name":"egl","version":"1.1.0","description":"","repository":{"type":"git","url":"git+https://forge.grandlyon.com/web-et-numerique/llle_project/egl-konnector.git"},"keywords":[],"author":"Grand Lyon","license":"AGPL-3.0","main":"./src/index.js","eslintConfig":{"extends":["cozy-app"]},"eslintIgnore":["build"],"husky":{"hooks":{"pre-commit":"yarn lint"}},"scripts":{"start":"node ./src/index.js","dev":"cozy-konnector-dev","standalone":"cozy-konnector-standalone","pretest":"npm run clean","test":"konitor testit .","check":"konitor check .","clean":"rm -rf ./data","build":"webpack","lint":"eslint --fix .","deploy":"git-directory-deploy --directory build/ --branch ${DEPLOY_BRANCH:-build}","deploy-dev":"git-directory-deploy --directory build/ --branch ${DEPLOY_BRANCH:-build-dev}","cozyPublish":"cozy-app-publish --token $REGISTRY_TOKEN --build-commit $(git rev-parse ${DEPLOY_BRANCH:-build})","travisDeployKey":"./bin/generate_travis_deploy_key"},"dependencies":{"@sentry/node":"^7.23.0","@sentry/tracing":"^7.23.0","cozy-konnector-libs":"4.53.0","moment":"^2.24.0","moment-timezone":"^0.5.26","node-fetch":"2"},"devDependencies":{"@types/moment-timezone":"^0.5.30","copy-webpack-plugin":"6.1.1","cozy-app-publish":"0.25.0","cozy-jobs-cli":"1.20.2","eslint":"5.16.0","eslint-config-cozy-app":"1.6.0","eslint-plugin-prettier":"3.0.1","git-directory-deploy":"1.5.1","husky":"4.3.0","standard-version":"^9.5.0","konitor":"0.10.2","svgo":"1.3.2","webpack":"5.38.1","webpack-cli":"3.3.9"}}');
/***/ }),
function isLocal() {
return (
process.env.NODE_ENV === 'development' ||
process.env.NODE_ENV === 'local' ||
process.env.NODE_ENV === 'standalone'
234193
234194
234195
234196
234197
234198
234199
234200
234201
234202
234203
234204
234205
234206
234207
234208
234209
)
}
/**
* Verify if it's an alpha URL
* @returns {boolean}
*/
function isDev() {
return (
process.env.COZY_URL.includes('alpha') ||
process.env.COZY_URL.includes('cozy.tools')
)
}
module.exports = { isLocal, isDev }
234211
234212
234213
234214
234215
234216
234217
234218
234219
234220
234221
234222
234223
234224
234225
234226
234227
234228
234229
234230
234231
234232
234233
234234
234235
234236
234237
234238
234239
234240
234241
234242
234243
234244
234245
234246
234247
234248
234249
234250
234251
234252
234253
234254
234255
234256
234257
234258
234259
234260
234261
234262
234263
234264
234265
234266
234267
234268
234269
234270
234271
234272
234273
234274
234275
234276
234277
234278
234279
234280
234281
234282
234283
234284
234285
234286
234287
234288
234289
234290
234291
234292
234293
234294
234295
234296
234297
234298
234299
234300
234301
234302
234303
234304
234305
234306
234307
234308
234309
234310
234311
234312
234313
234314
234315
234316
/******/ ]);
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ id: moduleId,
/******/ loaded: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = __webpack_module_cache__;
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ (() => {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = (module) => {
/******/ var getter = module && module.__esModule ?
/******/ () => (module['default']) :
/******/ () => (module);
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/harmony module decorator */
/******/ (() => {
/******/ __webpack_require__.hmd = (module) => {
/******/ module = Object.create(module);
/******/ if (!module.children) module.children = [];
/******/ Object.defineProperty(module, 'exports', {
/******/ enumerable: true,
/******/ set: () => {
/******/ throw new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);
/******/ }
/******/ });
/******/ return module;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/node module decorator */
/******/ (() => {
/******/ __webpack_require__.nmd = (module) => {
/******/ module.paths = [];
/******/ if (!module.children) module.children = [];
/******/ return module;
/******/ };
/******/ })();
/******/
/************************************************************************/
/******/
/******/ // module cache are used so entry inlining is disabled
/******/ // startup
/******/ // Load entry module and return exports
/******/ var __webpack_exports__ = __webpack_require__(__webpack_require__.s = 0);
/******/
/******/ })()
;