The Strøm open source speaker project have been started with the main goal of creating a fully functional "wifi speaker", but as an open sourced product.
Creative Commons Attribution Share Alike 4.0 International
103
stars
2
forks
source link
Bump undici and miniflare in /software/web-ide/stroem-web-ide #36
🚪 Add getMiniflareDurableObjectState() and runWithMiniflareDurableObjectGates() functions to the Jest/Vitest environments. This allows you to construct and call instance methods of Durable Objects directly, without having to fetch through a stub. Closes [issue #157](cloudflare/miniflare#157), thanks @jorroll.
// Durable Object class, would probably come from an import
class Counter {
constructor(state) {
this.storage = state.storage;
}
async fetch() {
const count = ((await this.storage.get("count")) ?? 0) + 1;
void this.storage.put("count", count);
return new Response(String(count));
}
}
const env = getMiniflareBindings();
// Use standard Durable Object bindings to generate IDs
const id = env.COUNTER.newUniqueId();
// Get DurableObjectState, and seed data
const state = await getMiniflareDurableObjectState(id);
await state.storage.put("count", 3);
// Construct object directly
const object = new Counter(state, env);
// Call instance method directly, closing input gate,
// and waiting for output gate to open
const res = await runWithMiniflareDurableObjectGates(state, () =>
object.fetch(new Request("http://localhost/"))
);
expect(await res.text()).toBe("4");
🥷 Don't construct corresponding Durable Object instance when calling Miniflare#getDurableObjectStorage(). This allows you to seed data before your Durable Object's constructor is invoked. Closes [issue #300](cloudflare/miniflare#300), thanks @spigaz.
☑️ Add support for WebSocket#readyState and WebSocket.READY_STATE_{CONNECTING,OPEN,CLOSING,CLOSED} constants. Note these constant names intentionally deviate from the spec to match the Workers runtime.
📜 Add persistent history to the REPL. This respects the MINIFLARE_REPL_HISTORY, MINIFLARE_REPL_HISTORY_SIZE, and MINIFLARE_REPL_MODE environment variables based on Node's.
💵 Add support for Range, If-Modified-Since and If-None-Match headers on Requests to Cache#match. Closes [issue #246](cloudflare/miniflare#246).
Fixes
Don't wait for waitUntilPromises to resolve before opening WebSocket connections
Ensure calling WebSocket#close() before returning a WebSocket response sends the correct close code and reason.
Fix delivery of incoming WebSocketerror events
Ensure only scheduled Durable Object alarms are flushed. Previously, flushing all alarms would attempt to execute the alarm handler of every constructed Durable Object instance, even if that instance hadn't scheduled an alarm, or didn't have an alarm handler.
Delay scheduled missed alarms. Previously, if Durable Object persistence was enabled, and an alarm should've executed when Miniflare wasn't running, Miniflare may have crashed on startup. Closes [issue #359](cloudflare/miniflare#359), thanks @AlCalzone.
🚪 Add getMiniflareDurableObjectState() and
runWithMiniflareDurableObjectGates() functions to the Jest/Vitest
environments. This allows you to construct and call instance methods of
Durable Objects directly, without having to fetch through a stub. Closes
[issue #157](cloudflare/miniflare#157), thanks
@jorroll.
// Durable Object class, would probably come from an import
class Counter {
constructor(state) {
this.storage = state.storage;
}
async fetch() {
const count = ((await this.storage.get("count")) ?? 0) + 1;
void this.storage.put("count", count);
return new Response(String(count));
}
}
const env = getMiniflareBindings();
// Use standard Durable Object bindings to generate IDs
const id = env.COUNTER.newUniqueId();
// Get DurableObjectState, and seed data
const state = await getMiniflareDurableObjectState(id);
await state.storage.put("count", 3);
// Construct object directly
const object = new Counter(state, env);
// Call instance method directly, closing input gate,
// and waiting for output gate to open
const res = await runWithMiniflareDurableObjectGates(state, () =>
object.fetch(new Request("http://localhost/"))
);
expect(await res.text()).toBe("4");
🥷 Don't construct corresponding Durable Object instance when calling
Miniflare#getDurableObjectStorage(). This allows you to seed data before
your Durable Object's constructor is invoked. Closes
[issue #300](cloudflare/miniflare#300), thanks
@spigaz.
... (truncated)
Commits
974c7c2 Bump versions to 2.9.0, update CHANGELOG.md and docs
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/LydByDissing/stroem/network/alerts).
Bumps undici and miniflare. These dependencies needed to be updated together. Updates
undici
from 5.5.1 to 5.9.1Release notes
Sourced from undici's releases.
... (truncated)
Commits
5890e16
5.9.1ecae314
fix: don't timeout while waiting for client to send request (#1604)fa9fd90
fix(File): respect typed arraybyteOffset
andbyteLength
(#1601)ae6f554
fix: add support forintegrity
option to Fetch (#1596)deed628
fix(fetch): implement fully read body algorithm (#1597)0d1419c
Fix array headers (#1598)52d1ce5
Bumped v5.8.266165d6
Merge pull request from GHSA-f772-66g8-q5h3124f7eb
Merge pull request from GHSA-8qr4-xgw6-wmr3aef314c
feat(webidl): better error message for ByteString converter (#1591)Updates
miniflare
from 2.6.0 to 2.9.0Release notes
Sourced from miniflare's releases.
... (truncated)
Changelog
Sourced from miniflare's changelog.
... (truncated)
Commits
974c7c2
Bump versions to2.9.0
, updateCHANGELOG.md
and docs6bace6b
D1 beta support (#329)2ca8115
Add persistent history to REPL, closes #3046299d1d
Don't construct object ongetDurableObjectStorage
, closes #3003c9763b
MakeStorageFactory#storage
synchronous14095e5
Bump versions to2.8.2
, updateCHANGELOG.md
e340868
Bump versions to2.8.1
, updateCHANGELOG.md
5bb6195
fix: add missing@miniflare/queues
dependency references (#361)57428ca
Bump versions to2.8.0
, updateCHANGELOG.md
and docs4c1bfdb
Initial Queues Support (#354)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/LydByDissing/stroem/network/alerts).