Skip to content

Commit

Permalink
fix crypto
Browse files Browse the repository at this point in the history
  • Loading branch information
cesara committed Dec 18, 2023
1 parent 08469f1 commit b3b8728
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/tiptap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"@types/node": "^20.3.1",
"@types/react": "^18.2.38",
"@types/react-dom": "^18.2.17",
"@types/uuid": "^9.0.7",
"concurrently": "^8.2.2",
"lexical": "^0.11.1",
"nanoid": "^5.0.3",
Expand Down
3 changes: 2 additions & 1 deletion examples/tiptap/src/reflect/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type {
} from "@rocicorp/reflect/server";
import { mutators as yjsMutators, Mutators } from "@rocicorp/reflect-yjs";
import { WriteTransaction } from "@rocicorp/reflect";
import { v4 as uuidv4 } from "uuid";

const authHandler: AuthHandler = (auth: string, _roomID: string) => {
if (auth) {
Expand All @@ -28,7 +29,7 @@ function makeOptions(): ReflectServerOptions<Mutators> {
roomStartHandler: async (tx: WriteTransaction, _roomID: string) => {
await yjsMutators.updateYJS(tx, {
name: "one",
id: crypto.randomUUID,
id: uuidv4(),
update:
"AAMAAwAGwcyjqQ4ICgACQgAyAkKKFQIAEQcBBAAoAIcABwAEAIcABwAExQe5B2RlZmF1bHRoZWFkaW5nQ2hhcHRlciBUd2VsdmU6IEhvbGRlbmxldmVscGFyYWdyYXBoVGhlIFRyYW5zcG9ydCBVbmlvbiBjb21wdHJvbGxlcuKAmXMgb2ZmaWNlcyB3ZXJlIGJ1cmllZCB0aHJlZSBsZXZlbHMgZGVlcCBpbiB0aGUgdGhpY2sgd2FsbHMgb2YgTWVkaW5hIFN0YXRpb27igJlzIHJvdGF0aW5nIGRydW0uIEl0IG1hZGUgdGhlIENvcmlvbGlzIHNsaWdodGx5IGxlc3Mgbm90aWNlYWJsZSB0aGFuIGluc2lkZSB0aGUgZHJ1bSwgYnV0IGFsc28gbWVhbnQgdGhhdCB0aGV5IHdlcmUgaW5zaWRlIGdyYXkgbWV0YWwgY3ViZXMgd2l0aCBkZXNrcyBpbiB0aGVtIGFuZCBubyBzY3JlZW5zIHRvIGV2ZW4gZ2l2ZSB0aGUgaWxsdXNpb24gb2YgYSB3aW5kb3cuIEhvbGRlbiBjb3VsZG7igJl0IHNheSBmb3Igc3VyZSB3aHkgaXQgZmVsdCBtb3JlIGRlcHJlc3NpbmcgdGhhbiBzaXR0aW5nIGluIHRoZSBtZXRhbCBjdWJlcyBvZiBhIHNwYWNlc2hpcCBjb21wYXJ0bWVudCwgYnV0IGl0IHdhcy4gTmFvbWkgc2F0IGJlc2lkZSBoaW0sIHdhdGNoaW5nIHRoZSBuZXdzZmVlZHMgb24gaGVyIGhhbmQgdGVybWluYWwsIHVuYWZmZWN0ZWQgYnkgdGhlIGdyaW0gbG9jYWxlLiBUaGUgUm9jaW5hbnRlIHdhcyBkb2luZyBhIG1hbmRhdG9yeSBzZWN1cml0eSBjb250cmFjdC4gVGhlIGZpcnN0IGdpZyBzaW5jZSB0aGV54oCZZCBsZWZ0LiBNYXliZSB0aGF0IHdhcyB3aGF0IGhlIHdhcyByZWFjdGluZyB0by5wYXJhZ3JhcGjigJxGb3JtIDQwMTEtRCB0cmFuc2ZlcnMgeW91ciByZXRhaW5lciBhbmQgZnV0dXJlIGNvbnRyYWN0cyB0byBSb2JlcnRhIFcuIERyYXBlciwgYW5kIHN0YXRlcyB0aGF0IHNoZSBpcyBub3cgdGhlIGxlZ2FsIGNhcHRhaW4gb2YgdGhlIFJvY2luYW50ZSwgYW5kIHByZXNpZGVudCBvZiBSb2NpY29ycCwgYSBDZXJlcy1yZWdpc3RlcmVkIGNvcnBvcmF0ZSBlbnRpdHku4oCdRwAWBQmjCgmPAwMBAAAGAwYDBgMGAQEBCgB9AQA=",
});
Expand Down
14 changes: 14 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b3b8728

Please sign in to comment.