mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
fix: Pollyfill crypto.randomUUID (#904)
This commit is contained in:
parent
ab3b5cb628
commit
8874648947
5 changed files with 24 additions and 0 deletions
5
.changeset/silent-apes-burn.md
Normal file
5
.changeset/silent-apes-burn.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@hyperdx/app": patch
|
||||
---
|
||||
|
||||
fix: Pollyfill crypto.randomUUID
|
||||
|
|
@ -50,6 +50,7 @@
|
|||
"chrono-node": "^2.7.8",
|
||||
"classnames": "^2.3.1",
|
||||
"crypto-js": "^4.2.0",
|
||||
"crypto-randomuuid": "^1.0.0",
|
||||
"date-fns": "^2.28.0",
|
||||
"date-fns-tz": "^2.0.0",
|
||||
"fuse.js": "^6.6.2",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import type { NextPage } from 'next';
|
|||
import type { AppProps } from 'next/app';
|
||||
import Head from 'next/head';
|
||||
import { NextAdapter } from 'next-query-params';
|
||||
import randomUUID from 'crypto-randomuuid';
|
||||
import { enableMapSet } from 'immer';
|
||||
import SSRProvider from 'react-bootstrap/SSRProvider';
|
||||
import { QueryParamProvider } from 'use-query-params';
|
||||
|
|
@ -29,6 +30,11 @@ import '@styles/globals.css';
|
|||
import '@styles/app.scss';
|
||||
import 'uplot/dist/uPlot.min.css';
|
||||
|
||||
// Polyfill crypto.randomUUID for non-HTTPS environments
|
||||
if (typeof crypto !== 'undefined' && !crypto.randomUUID) {
|
||||
crypto.randomUUID = randomUUID;
|
||||
}
|
||||
|
||||
enableMapSet();
|
||||
|
||||
const queryClient = new QueryClient({
|
||||
|
|
|
|||
4
packages/app/types/crypto-randomuuid.d.ts
vendored
Normal file
4
packages/app/types/crypto-randomuuid.d.ts
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
declare module 'crypto-randomuuid' {
|
||||
function randomUUID(): string;
|
||||
export = randomUUID;
|
||||
}
|
||||
|
|
@ -4399,6 +4399,7 @@ __metadata:
|
|||
chrono-node: "npm:^2.7.8"
|
||||
classnames: "npm:^2.3.1"
|
||||
crypto-js: "npm:^4.2.0"
|
||||
crypto-randomuuid: "npm:^1.0.0"
|
||||
date-fns: "npm:^2.28.0"
|
||||
date-fns-tz: "npm:^2.0.0"
|
||||
fuse.js: "npm:^6.6.2"
|
||||
|
|
@ -13554,6 +13555,13 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"crypto-randomuuid@npm:^1.0.0":
|
||||
version: 1.0.0
|
||||
resolution: "crypto-randomuuid@npm:1.0.0"
|
||||
checksum: 10c0/6c8f7513f3b0c38b876b5011d91e21c284f7a695d27b6ef25a2a1ca89c362af23e321bf47953069b9fe56bc384de7880a13c390a4663ac5dcf525a1b4f937a1f
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"css-functions-list@npm:^3.2.2":
|
||||
version: 3.2.2
|
||||
resolution: "css-functions-list@npm:3.2.2"
|
||||
|
|
|
|||
Loading…
Reference in a new issue