diff --git a/package-lock.json b/package-lock.json index f6abe2054..94479b7f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15149,12 +15149,16 @@ } }, "node_modules/uuid": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", - "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.0.tgz", + "integrity": "sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], "license": "MIT", "bin": { - "uuid": "dist/bin/uuid" + "uuid": "dist-node/bin/uuid" } }, "node_modules/uuid-parse": { @@ -16310,7 +16314,7 @@ "rxjs": "^5.5.11", "uritemplate": "0.3.4", "url-toolkit": "2.1.6", - "uuid": "^7.0.3", + "uuid": "^14.0.0", "web-streams-polyfill": "^4.0.0", "wot-thing-description-types": "^1.1.0-12-March-2025" }, diff --git a/packages/core/package.json b/packages/core/package.json index d014a3af4..6356a6a85 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -32,7 +32,7 @@ "rxjs": "^5.5.11", "uritemplate": "0.3.4", "url-toolkit": "2.1.6", - "uuid": "^7.0.3", + "uuid": "^14.0.0", "web-streams-polyfill": "^4.0.0", "wot-thing-description-types": "^1.1.0-12-March-2025" }, diff --git a/packages/core/src/servient.ts b/packages/core/src/servient.ts index 41111144f..14afae156 100644 --- a/packages/core/src/servient.ts +++ b/packages/core/src/servient.ts @@ -19,7 +19,7 @@ import WoTImpl from "./wot-impl"; import ExposedThing from "./exposed-thing"; import { ProtocolClientFactory, ProtocolServer, ProtocolClient } from "./protocol-interfaces"; import ContentManager, { ContentCodec } from "./content-serdes"; -import { v4 } from "uuid"; +const uuid = require("uuid"); import { createLoggers } from "./logger"; import { Helpers, Thing } from "./core"; @@ -90,7 +90,7 @@ export default class Servient { public addThing(thing: ExposedThing): boolean { if (!thing.id) { - thing.id = "urn:uuid:" + v4(); + thing.id = "urn:uuid:" + uuid.v4(); warn(`Servient generating ID for '${thing.title}': '${thing.id}'`); }