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
17
frontend/node_modules/crypto-random-string/index.d.ts
generated
vendored
Normal file
17
frontend/node_modules/crypto-random-string/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
Generate a [cryptographically strong](https://en.m.wikipedia.org/wiki/Strong_cryptography) random string.
|
||||
|
||||
@param length - Length of the returned string.
|
||||
@returns A [`hex`](https://en.wikipedia.org/wiki/Hexadecimal) string.
|
||||
|
||||
@example
|
||||
```
|
||||
import cryptoRandomString = require('crypto-random-string');
|
||||
|
||||
cryptoRandomString(10);
|
||||
//=> '2cf05d94db'
|
||||
```
|
||||
*/
|
||||
declare function cryptoRandomString(length: number): string;
|
||||
|
||||
export = cryptoRandomString;
|
||||
10
frontend/node_modules/crypto-random-string/index.js
generated
vendored
Normal file
10
frontend/node_modules/crypto-random-string/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
'use strict';
|
||||
const crypto = require('crypto');
|
||||
|
||||
module.exports = length => {
|
||||
if (!Number.isFinite(length)) {
|
||||
throw new TypeError('Expected a finite number');
|
||||
}
|
||||
|
||||
return crypto.randomBytes(Math.ceil(length / 2)).toString('hex').slice(0, length);
|
||||
};
|
||||
9
frontend/node_modules/crypto-random-string/license
generated
vendored
Normal file
9
frontend/node_modules/crypto-random-string/license
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
40
frontend/node_modules/crypto-random-string/package.json
generated
vendored
Normal file
40
frontend/node_modules/crypto-random-string/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"name": "crypto-random-string",
|
||||
"version": "2.0.0",
|
||||
"description": "Generate a cryptographically strong random string",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/crypto-random-string",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"random",
|
||||
"string",
|
||||
"text",
|
||||
"id",
|
||||
"identifier",
|
||||
"slug",
|
||||
"salt",
|
||||
"crypto",
|
||||
"strong",
|
||||
"secure",
|
||||
"hex"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^1.4.1",
|
||||
"tsd": "^0.7.2",
|
||||
"xo": "^0.24.0"
|
||||
}
|
||||
}
|
||||
51
frontend/node_modules/crypto-random-string/readme.md
generated
vendored
Normal file
51
frontend/node_modules/crypto-random-string/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
# crypto-random-string [](https://travis-ci.org/sindresorhus/crypto-random-string)
|
||||
|
||||
> Generate a [cryptographically strong](https://en.m.wikipedia.org/wiki/Strong_cryptography) random string
|
||||
|
||||
Can be useful for creating an identifier, slug, salt, fixture, etc.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install crypto-random-string
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const cryptoRandomString = require('crypto-random-string');
|
||||
|
||||
cryptoRandomString(10);
|
||||
//=> '2cf05d94db'
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### cryptoRandomString(length)
|
||||
|
||||
Returns a [`hex`](https://en.wikipedia.org/wiki/Hexadecimal) string.
|
||||
|
||||
#### length
|
||||
|
||||
Type: `number`
|
||||
|
||||
Length of the returned string.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [random-int](https://github.com/sindresorhus/random-int) - Generate a random integer
|
||||
- [random-float](https://github.com/sindresorhus/random-float) - Generate a random float
|
||||
- [random-item](https://github.com/sindresorhus/random-item) - Get a random item from an array
|
||||
- [random-boolean](https://github.com/arthurvr/random-boolean) - Get a random boolean
|
||||
- [random-obj-key](https://github.com/sindresorhus/random-obj-key) - Get a random key from an object
|
||||
- [random-obj-prop](https://github.com/sindresorhus/random-obj-prop) - Get a random property from an object
|
||||
- [unique-random](https://github.com/sindresorhus/unique-random) - Generate random numbers that are consecutively unique
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
Loading…
Add table
Add a link
Reference in a new issue