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
63
frontend/node_modules/es-abstract/2021/GetIterator.js
generated
vendored
Normal file
63
frontend/node_modules/es-abstract/2021/GetIterator.js
generated
vendored
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = require('es-errors/type');
|
||||
var $SyntaxError = require('es-errors/syntax');
|
||||
var isObject = require('es-object-atoms/isObject');
|
||||
var $asyncIterator = GetIntrinsic('%Symbol.asyncIterator%', true);
|
||||
|
||||
var inspect = require('object-inspect');
|
||||
var hasSymbols = require('has-symbols')();
|
||||
|
||||
var getIteratorMethod = require('../helpers/getIteratorMethod');
|
||||
var AdvanceStringIndex = require('./AdvanceStringIndex');
|
||||
var Call = require('./Call');
|
||||
var GetMethod = require('./GetMethod');
|
||||
|
||||
var ES = {
|
||||
AdvanceStringIndex: AdvanceStringIndex,
|
||||
GetMethod: GetMethod
|
||||
};
|
||||
|
||||
// https://262.ecma-international.org/9.0/#sec-getiterator
|
||||
|
||||
module.exports = function GetIterator(obj, hint, method) {
|
||||
var actualHint = hint;
|
||||
if (arguments.length < 2) {
|
||||
actualHint = 'sync';
|
||||
}
|
||||
if (actualHint !== 'sync' && actualHint !== 'async') {
|
||||
throw new $TypeError("Assertion failed: `hint` must be one of 'sync' or 'async', got " + inspect(hint));
|
||||
}
|
||||
|
||||
var actualMethod = method;
|
||||
if (arguments.length < 3) {
|
||||
if (actualHint === 'async') {
|
||||
if (hasSymbols && $asyncIterator) {
|
||||
actualMethod = GetMethod(obj, $asyncIterator);
|
||||
}
|
||||
if (typeof actualMethod === 'undefined') {
|
||||
throw new $SyntaxError("async from sync iterators aren't currently supported");
|
||||
}
|
||||
} else {
|
||||
actualMethod = getIteratorMethod(ES, obj);
|
||||
}
|
||||
}
|
||||
var iterator = Call(actualMethod, obj);
|
||||
if (!isObject(iterator)) {
|
||||
throw new $TypeError('iterator must return an object');
|
||||
}
|
||||
|
||||
return iterator;
|
||||
|
||||
// TODO: This should return an IteratorRecord
|
||||
/*
|
||||
var nextMethod = GetV(iterator, 'next');
|
||||
return {
|
||||
'[[Iterator]]': iterator,
|
||||
'[[NextMethod]]': nextMethod,
|
||||
'[[Done]]': false
|
||||
};
|
||||
*/
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue