chore: drop uuid in favor of node:crypto randomUUID

This commit is contained in:
WebStreamr 2025-09-08 07:38:24 +00:00
parent b60f91a96a
commit 3380185449
No known key found for this signature in database
3 changed files with 2 additions and 17 deletions

14
package-lock.json generated
View file

@ -25,7 +25,6 @@
"tough-cookie": "^6.0.0",
"undici": "^7.10.0",
"unpacker": "^1.0.1",
"uuid": "^11.1.0",
"winston": "^3.17.0"
},
"devDependencies": {
@ -10875,19 +10874,6 @@
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
"license": "MIT"
},
"node_modules/uuid": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz",
"integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==",
"funding": [
"https://github.com/sponsors/broofa",
"https://github.com/sponsors/ctavan"
],
"license": "MIT",
"bin": {
"uuid": "dist/esm/bin/uuid"
}
},
"node_modules/v8-compile-cache-lib": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",

View file

@ -47,7 +47,6 @@
"tough-cookie": "^6.0.0",
"undici": "^7.10.0",
"unpacker": "^1.0.1",
"uuid": "^11.1.0",
"winston": "^3.17.0"
},
"devDependencies": {

View file

@ -1,7 +1,7 @@
import { randomUUID } from 'node:crypto';
import express, { NextFunction, Request, Response } from 'express';
import { socksDispatcher } from 'fetch-socks';
import { Agent, Dispatcher, interceptors, ProxyAgent, setGlobalDispatcher } from 'undici';
import { v4 as uuidv4 } from 'uuid';
import winston from 'winston';
import { ConfigureController, ManifestController, StreamController } from './controller';
import { BlockedError, logErrorAndReturnNiceString } from './error';
@ -62,7 +62,7 @@ const addon = express();
addon.set('trust proxy', true);
addon.use((_req: Request, res: Response, next: NextFunction) => {
res.setHeader('X-Request-ID', uuidv4());
res.setHeader('X-Request-ID', randomUUID());
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Headers', '*');