nostr-tools
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -367,2 +367,12 @@ "use strict"; | ||
// helpers.ts | ||
async function yieldThread() { | ||
return new Promise((resolve) => { | ||
const ch = new MessageChannel(); | ||
ch.port1.addEventListener("message", resolve); | ||
ch.port2.postMessage(0); | ||
ch.port1.start(); | ||
}); | ||
} | ||
// relay.ts | ||
@@ -463,3 +473,3 @@ function relayConnect(url) { | ||
} | ||
await Promise.resolve(); | ||
await yieldThread(); | ||
} | ||
@@ -466,0 +476,0 @@ this.queueRunning = false; |
@@ -251,2 +251,12 @@ "use strict"; | ||
// helpers.ts | ||
async function yieldThread() { | ||
return new Promise((resolve) => { | ||
const ch = new MessageChannel(); | ||
ch.port1.addEventListener("message", resolve); | ||
ch.port2.postMessage(0); | ||
ch.port1.start(); | ||
}); | ||
} | ||
// relay.ts | ||
@@ -342,3 +352,3 @@ var Relay = class { | ||
} | ||
await Promise.resolve(); | ||
await yieldThread(); | ||
} | ||
@@ -345,0 +355,0 @@ this.queueRunning = false; |
@@ -253,2 +253,12 @@ "use strict"; | ||
// helpers.ts | ||
async function yieldThread() { | ||
return new Promise((resolve) => { | ||
const ch = new MessageChannel(); | ||
ch.port1.addEventListener("message", resolve); | ||
ch.port2.postMessage(0); | ||
ch.port1.start(); | ||
}); | ||
} | ||
// relay.ts | ||
@@ -349,3 +359,3 @@ function relayConnect(url) { | ||
} | ||
await Promise.resolve(); | ||
await yieldThread(); | ||
} | ||
@@ -352,0 +362,0 @@ this.queueRunning = false; |
@@ -313,2 +313,12 @@ var __defProp = Object.defineProperty; | ||
// helpers.ts | ||
async function yieldThread() { | ||
return new Promise((resolve) => { | ||
const ch = new MessageChannel(); | ||
ch.port1.addEventListener("message", resolve); | ||
ch.port2.postMessage(0); | ||
ch.port1.start(); | ||
}); | ||
} | ||
// relay.ts | ||
@@ -409,3 +419,3 @@ function relayConnect(url) { | ||
} | ||
await Promise.resolve(); | ||
await yieldThread(); | ||
} | ||
@@ -412,0 +422,0 @@ this.queueRunning = false; |
@@ -231,2 +231,12 @@ var __defProp = Object.defineProperty; | ||
// helpers.ts | ||
async function yieldThread() { | ||
return new Promise((resolve) => { | ||
const ch = new MessageChannel(); | ||
ch.port1.addEventListener("message", resolve); | ||
ch.port2.postMessage(0); | ||
ch.port1.start(); | ||
}); | ||
} | ||
// relay.ts | ||
@@ -322,3 +332,3 @@ var Relay = class { | ||
} | ||
await Promise.resolve(); | ||
await yieldThread(); | ||
} | ||
@@ -325,0 +335,0 @@ this.queueRunning = false; |
@@ -231,2 +231,12 @@ var __defProp = Object.defineProperty; | ||
// helpers.ts | ||
async function yieldThread() { | ||
return new Promise((resolve) => { | ||
const ch = new MessageChannel(); | ||
ch.port1.addEventListener("message", resolve); | ||
ch.port2.postMessage(0); | ||
ch.port1.start(); | ||
}); | ||
} | ||
// relay.ts | ||
@@ -327,3 +337,3 @@ function relayConnect(url) { | ||
} | ||
await Promise.resolve(); | ||
await yieldThread(); | ||
} | ||
@@ -330,0 +340,0 @@ this.queueRunning = false; |
{ | ||
"name": "nostr-tools", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Tools for making a Nostr client.", | ||
@@ -190,3 +190,6 @@ "repository": { | ||
"typescript": "^5.0.4" | ||
}, | ||
"scripts": { | ||
"prepublish": "just build && just emit-types" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1741420
175
16946