Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .changeset/all-streets-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"miniflare": minor
---

Implement local KV API for experimental/WIP local resource explorer

The following APIs have been (mostly) implemented:
GET /storage/kv/namespaces - List namespaces
GET /storage/kv/namespaces/:id/keys - List keys
GET /storage/kv/namespaces/:id/values/:key - Get value
PUT /storage/kv/namespaces/:id/values/:key - Write value
DELETE /storage/kv/namespaces/:id/values/:key - Delete key
POST /storage/kv/namespaces/:id/bulk/get - Bulk get values
5 changes: 5 additions & 0 deletions .changeset/bright-eggs-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cloudflare/workers-shared": patch
---

The asset-worker now uses a shorter 10-second TTL for cached assets, down from 60 seconds. This ensures that asset updates are reflected more quickly during development and deployment, reducing the window where stale assets might be served.
7 changes: 7 additions & 0 deletions .changeset/logout-invalid-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"wrangler": patch
---

Prevent `wrangler logout` from failing when the Wrangler configuration file is invalid

Previously, if your `wrangler.toml` or `wrangler.json` file contained syntax errors or invalid values, the `wrangler logout` command would fail. Now, configuration parsing errors are caught and logged at debug level, allowing you to log out regardless of the state of your configuration file.
10 changes: 2 additions & 8 deletions .github/workflows/changeset-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,8 @@ name: Changeset Review

on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
paths:
- ".changeset/*.md"
workflow_dispatch:
inputs:
pr_number:
description: "PR number to review"
required: true
type: number

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -25,7 +18,7 @@ permissions:
jobs:
review-changesets:
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository && !contains(github.event.pull_request.labels.*.name, 'skip-changeset-review') && !contains(github.event.pull_request.labels.*.name, 'no-changeset-required')
if: github.event.pull_request.head.repo.full_name == github.repository
steps:
- name: Checkout PR branch
uses: actions/checkout@v4
Expand All @@ -52,6 +45,7 @@ jobs:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
allowed_bots: "devin-ai-integration[bot]"
use_sticky_comment: true
track_progress: true
prompt: |
Review the changeset files in this PR.

Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/opencode-issue-solver.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: OpenCode Issue Solver

on:
workflow_dispatch:
inputs:
issue-number:
description: "Issue number to attempt to fix"
required: true
type: number

jobs:
assess-issue:
runs-on: ubuntu-latest

steps:
- name: Exit
run: |
exit 1
1 change: 1 addition & 0 deletions .github/workflows/vite-plugin-playgrounds.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Vite plugin playgrounds

on:
merge_group:
pull_request:

permissions:
Expand Down
29 changes: 26 additions & 3 deletions fixtures/worker-with-resources/tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,32 @@ describe("local explorer", () => {
});

it("returns local explorer API response for /cdn-cgi/explorer/api", async () => {
const response = await fetch(`http://${ip}:${port}/cdn-cgi/explorer/api`);
const text = await response.text();
expect(text).toBe("Hello from local explorer API");
const response = await fetch(
`http://${ip}:${port}/cdn-cgi/explorer/api/storage/kv/namespaces`
);
expect(response.headers.get("Content-Type")).toBe("application/json");
const json = await response.json();
expect(json).toMatchObject({
errors: [],
messages: [],
result: [
{
id: "KV",
title: "KV",
},
{
id: "some-kv-id",
title: "KV_WITH_ID",
},
],
result_info: {
count: 2,
page: 1,
per_page: 20,
total_count: 2,
},
success: true,
});
});

it("returns worker response for normal requests", async () => {
Expand Down
4 changes: 4 additions & 0 deletions fixtures/worker-with-resources/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
{
"binding": "KV",
},
{
"binding": "KV_WITH_ID",
"id": "some-kv-id",
},
],
"d1_databases": [
{
Expand Down
2 changes: 1 addition & 1 deletion packages/create-cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"glob": "^10.3.3",
"haikunator": "^2.1.2",
"indent-string": "^5.0.0",
"jsonc-parser": "^3.2.0",
"jsonc-parser": "catalog:default",
"magic-string": "^0.30.5",
"open": "^8.4.0",
"recast": "^0.22.0",
Expand Down
8 changes: 8 additions & 0 deletions packages/miniflare/openapi-ts.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { defineConfig } from "@hey-api/openapi-ts";

export default defineConfig({
// Keep these paths in sync with the prettier inputs in package.json (generate:types script)
input: "src/workers/local-explorer/openapi.local.json",
output: "src/workers/local-explorer/generated",
plugins: ["@hey-api/typescript", "zod"],
});
6 changes: 6 additions & 0 deletions packages/miniflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
"check:type": "tsc",
"clean": "rimraf ./dist ./dist-types",
"dev": "concurrently -n esbuild,typechk,typewrk -c yellow,blue,blue.dim \"node scripts/build.mjs watch\" \"node scripts/types.mjs tsconfig.json watch\" \"node scripts/types.mjs src/workers/tsconfig.json watch\"",
"generate:api": "pnpm generate:openapi && pnpm generate:types",
"generate:openapi": "node -r esbuild-register scripts/filter-openapi.ts -i $OPENAPI_INPUT_PATH",
"generate:types": "openapi-ts && prettier --write src/workers/local-explorer/openapi.local.json src/workers/local-explorer/generated",
"lint:fix": "pnpm run check:lint --fix",
"test": "vitest run",
"posttest": "rimraf ./.tmp",
Expand All @@ -58,6 +61,7 @@
"@cloudflare/workers-shared": "workspace:*",
"@cloudflare/workers-types": "catalog:default",
"@cloudflare/workflows-shared": "workspace:*",
"@hey-api/openapi-ts": "^0.90.0",
"@microsoft/api-extractor": "^7.52.8",
"@puppeteer/browsers": "^2.10.6",
"@types/debug": "^4.1.7",
Expand Down Expand Up @@ -87,7 +91,9 @@
"get-port": "^7.1.0",
"glob-to-regexp": "0.4.1",
"heap-js": "^2.5.0",
"hono": "^4.11.5",
"http-cache-semantics": "^4.1.0",
"jsonc-parser": "catalog:default",
"kleur": "^4.1.5",
"mime": "^3.0.0",
"postal-mime": "^2.4.3",
Expand Down
Loading
Loading