Skip to content

Commit

Permalink
all: upgrade wrangler
Browse files Browse the repository at this point in the history
  • Loading branch information
raykyri committed Dec 12, 2024
1 parent 131d988 commit 0fb9002
Show file tree
Hide file tree
Showing 9 changed files with 209 additions and 38 deletions.
219 changes: 192 additions & 27 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions packages/core/src/Canvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,13 @@ export class Canvas<
} while (resultCount > 0)
}

app.addEventListener("message", (event) =>{
const message = event.detail
if (message.message.payload.type !== "action") {
return
}
})

return app
}

Expand Down
2 changes: 1 addition & 1 deletion packages/gossiplog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,6 @@
"p-defer": "^4.0.1",
"prando": "^6.0.1",
"web-locks": "^0.0.8",
"wrangler": "^3.78.12"
"wrangler": "^3.95.0"
}
}
4 changes: 2 additions & 2 deletions packages/gossiplog/src/do/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Tree as MemoryTree } from "@canvas-js/okra-memory"

import { ModelDB, ModelDBProxy } from "@canvas-js/modeldb-durable-objects"

import { UnstableDevWorker } from "wrangler"
import { Unstable_DevWorker } from "wrangler"
import { SqlStorage } from "@cloudflare/workers-types"

import { AbstractGossipLog, GossipLogInit } from "../AbstractGossipLog.js"
Expand All @@ -22,7 +22,7 @@ export class GossipLog<Payload> extends AbstractGossipLog<Payload> {
...init
}: {
db?: SqlStorage
worker?: UnstableDevWorker
worker?: Unstable_DevWorker
useTestProxy?: boolean
clear?: boolean
} & GossipLogInit<Payload>) {
Expand Down
1 change: 0 additions & 1 deletion packages/gossiplog/test/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { toString } from "uint8arrays"
import { PoolConfig } from "pg"

import { unstable_dev } from "wrangler"
import type { UnstableDevWorker } from "wrangler"

import { Key, Node } from "@canvas-js/okra"

Expand Down
2 changes: 1 addition & 1 deletion packages/modeldb-durable-objects/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"@ipld/dag-json": "^10.2.3",
"@types/better-sqlite3": "^7.6.10",
"better-sqlite3": "^11.0.0",
"wrangler": "^3.78.12"
"wrangler": "^3.95.0"
}
}
6 changes: 3 additions & 3 deletions packages/modeldb-durable-objects/src/ModelDBProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import * as json from "@ipld/dag-json"

import { ModelDB } from "./ModelDB.js"
import { randomUUID } from "./utils.js"
import { UnstableDevWorker } from "wrangler"
import { Unstable_DevWorker } from "wrangler"

type Subscription = {
model: string
Expand All @@ -26,14 +26,14 @@ type Subscription = {
// A mock ModelDB that proxies requests to a Durable Objects via a ModelDBProxyWorker.
// Use this for testing only, it makes extra requests to fetch subscriptions.
export class ModelDBProxy extends AbstractModelDB {
worker: UnstableDevWorker
worker: Unstable_DevWorker
baseUrl: string
initialized: boolean
uuid: string

subscriptions: Map<number, Subscription>

constructor(worker: UnstableDevWorker, models: ModelSchema, baseUrl?: string, uuid?: string) {
constructor(worker: Unstable_DevWorker, models: ModelSchema, baseUrl?: string, uuid?: string) {
super(parseConfig(models))

this.worker = worker
Expand Down
2 changes: 1 addition & 1 deletion packages/modeldb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"nanoid": "^5.0.7",
"puppeteer": "^23.4.1",
"vite": "^5.4.8",
"wrangler": "^3.78.12"
"wrangler": "^3.95.0"
},
"dependencies": {
"@canvas-js/utils": "0.13.6",
Expand Down
4 changes: 2 additions & 2 deletions packages/modeldb/test/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { fileURLToPath } from "node:url"
import { createServer, ViteDevServer } from "vite"

import { unstable_dev } from "wrangler"
import type { UnstableDevWorker } from "wrangler"
import type { Unstable_DevWorker } from "wrangler"

const __dirname = path.resolve(fileURLToPath(new URL(".", import.meta.url)), "..")

Expand All @@ -22,7 +22,7 @@ import { ModelDB as ModelDBSqliteExpo } from "@canvas-js/modeldb-sqlite-expo"
let browser: puppeteer.Browser
let page: puppeteer.Page
let server: ViteDevServer
let worker: UnstableDevWorker
let worker: Unstable_DevWorker

test.before(async (t) => {
server = await createServer({
Expand Down

0 comments on commit 0fb9002

Please sign in to comment.