Add sync error logging, extend error flash, fix unload saves
- Log workforce sync errors to backend stdout so they appear in docker logs - Extend error flash from 5s to 15s so errors are readable - Replace sendBeacon (POST-only) with keepalive fetch (PUT) on unload — sendBeacon was hitting 404s on all three unload saves Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c7066521ff
commit
18e24efbeb
14485 changed files with 1836116 additions and 33 deletions
56
frontend/node_modules/es-to-primitive/es5.js
generated
vendored
Normal file
56
frontend/node_modules/es-to-primitive/es5.js
generated
vendored
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
'use strict';
|
||||
|
||||
var toStr = Object.prototype.toString;
|
||||
|
||||
var isPrimitive = require('./helpers/isPrimitive');
|
||||
|
||||
var isCallable = require('is-callable');
|
||||
var $TypeError = require('es-errors/type');
|
||||
|
||||
/** @import { unknownES5 } from './es5' */
|
||||
|
||||
// http://ecma-international.org/ecma-262/5.1/#sec-8.12.8
|
||||
var ES5internalSlots = /** @type {const} */ ({
|
||||
'[[DefaultValue]]': /** @param {object} O */ function (O) {
|
||||
var actualHint;
|
||||
if (arguments.length > 1) {
|
||||
actualHint = arguments[1];
|
||||
} else {
|
||||
actualHint = toStr.call(O) === '[object Date]' ? String : Number;
|
||||
}
|
||||
|
||||
if (actualHint === String || actualHint === Number) {
|
||||
var methods = actualHint === String
|
||||
? /** @type {const} */ (['toString', 'valueOf'])
|
||||
: /** @type {const} */ (['valueOf', 'toString']);
|
||||
/** @type {unknownES5} */
|
||||
var value;
|
||||
for (var i = 0; i < methods.length; ++i) {
|
||||
var method = methods[i];
|
||||
if (isCallable(O[method])) {
|
||||
|
||||
value = O[method]();
|
||||
if (isPrimitive(value)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
throw new $TypeError('No default value');
|
||||
}
|
||||
throw new $TypeError('invalid [[DefaultValue]] hint supplied');
|
||||
}
|
||||
});
|
||||
|
||||
/** @type {import('./es5')} */
|
||||
// http://ecma-international.org/ecma-262/5.1/#sec-9.1
|
||||
module.exports = function ToPrimitive(input) {
|
||||
if (isPrimitive(input)) {
|
||||
return input;
|
||||
}
|
||||
if (arguments.length > 1) {
|
||||
|
||||
return ES5internalSlots['[[DefaultValue]]'](input, arguments[1]);
|
||||
}
|
||||
|
||||
return ES5internalSlots['[[DefaultValue]]'](input);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue