fix: randomstring dep does not work in browser with rolldown-vite (#9624)

* fix: randomstring dep does not work in browser with rolldown-vite

* fix: Last usage of randomstring, docs

* feedback
This commit is contained in:
Tom Moor
2025-07-13 09:33:16 -04:00
committed by GitHub
parent 40e6a87d15
commit 772eb2f1d4
15 changed files with 290 additions and 119 deletions
@@ -1,12 +1,11 @@
import filter from "lodash/filter";
import includes from "lodash/includes";
import isEqual from "lodash/isEqual";
import randomstring from "randomstring";
import * as React from "react";
import { useEffect } from "react";
import { useForm } from "react-hook-form";
import { useTranslation, Trans } from "react-i18next";
import styled from "styled-components";
import { randomString } from "@shared/random";
import { TeamPreference } from "@shared/types";
import WebhookSubscription from "~/models/WebhookSubscription";
import Button from "~/components/Button";
@@ -159,7 +158,7 @@ interface FormData {
}
function generateSigningSecret() {
return `ol_whs_${randomstring.generate(32)}`;
return `ol_whs_${randomString(32)}`;
}
function WebhookSubscriptionForm({ handleSubmit, webhookSubscription }: Props) {