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
38
frontend/node_modules/is-date-object/test/index.js
generated
vendored
Normal file
38
frontend/node_modules/is-date-object/test/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
var isDate = require('../');
|
||||
var hasToStringTag = require('has-tostringtag/shams')();
|
||||
|
||||
test('not Dates', function (t) {
|
||||
// @ts-expect-error
|
||||
t.notOk(isDate(), 'undefined is not Date');
|
||||
t.notOk(isDate(null), 'null is not Date');
|
||||
t.notOk(isDate(false), 'false is not Date');
|
||||
t.notOk(isDate(true), 'true is not Date');
|
||||
t.notOk(isDate(42), 'number is not Date');
|
||||
t.notOk(isDate('foo'), 'string is not Date');
|
||||
t.notOk(isDate([]), 'array is not Date');
|
||||
t.notOk(isDate({}), 'object is not Date');
|
||||
t.notOk(isDate(function () {}), 'function is not Date');
|
||||
t.notOk(isDate(/a/g), 'regex literal is not Date');
|
||||
t.notOk(isDate(new RegExp('a', 'g')), 'regex object is not Date');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('@@toStringTag', { skip: !hasToStringTag }, function (t) {
|
||||
var realDate = new Date();
|
||||
/** @type {{ toString(): unknown; valueOf(): unknown; [Symbol.toStringTag]?: string; }} */
|
||||
var fakeDate = {
|
||||
toString: function () { return String(realDate); },
|
||||
valueOf: function () { return realDate.getTime(); }
|
||||
};
|
||||
fakeDate[Symbol.toStringTag] = 'Date';
|
||||
t.notOk(isDate(fakeDate), 'fake Date with @@toStringTag "Date" is not Date');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('Dates', function (t) {
|
||||
t.ok(isDate(new Date()), 'new Date() is Date');
|
||||
t.end();
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue