diff --git a/.wrangler/state/v3/do/atproto-pds-PersonalDataServer/d67d37442b3ca7789897149c593e43bcf1fd6a9933be25596eb0cbe4c6a0783e.sqlite b/.wrangler/state/v3/do/atproto-pds-PersonalDataServer/d67d37442b3ca7789897149c593e43bcf1fd6a9933be25596eb0cbe4c6a0783e.sqlite deleted file mode 100644 index 0b58f0dca7d6ce95907cb0b322dc4802f04688c0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4096 zcmWFz^vNtqRY=P(%1ta$FlG>7U}9o$P*7lCU|@t|1_}TpgI-+(FUSA^5HX5JLtr!n lMnhmU1V%$(Gz3ONU^E0qLtr!nMnhmU1V%$(Gz11B1OV3(2Il|( diff --git a/.wrangler/tmp/bundle-MaCAbF/checked-fetch.js b/.wrangler/tmp/bundle-MaCAbF/checked-fetch.js deleted file mode 100644 index 8c007fd..0000000 --- a/.wrangler/tmp/bundle-MaCAbF/checked-fetch.js +++ /dev/null @@ -1,30 +0,0 @@ -const urls = new Set(); - -function checkURL(request, init) { - const url = - request instanceof URL - ? request - : new URL( - (typeof request === "string" - ? new Request(request, init) - : request - ).url - ); - if (url.port && url.port !== "443" && url.protocol === "https:") { - if (!urls.has(url.toString())) { - urls.add(url.toString()); - console.warn( - `WARNING: known issue with \`fetch()\` requests to custom HTTPS ports in published Workers:\n` + - ` - ${url.toString()} - the custom port will be ignored when the Worker is published using the \`wrangler deploy\` command.\n` - ); - } - } -} - -globalThis.fetch = new Proxy(globalThis.fetch, { - apply(target, thisArg, argArray) { - const [request, init] = argArray; - checkURL(request, init); - return Reflect.apply(target, thisArg, argArray); - }, -}); diff --git a/.wrangler/tmp/bundle-MaCAbF/middleware-insertion-facade.js b/.wrangler/tmp/bundle-MaCAbF/middleware-insertion-facade.js deleted file mode 100644 index e8f028b..0000000 --- a/.wrangler/tmp/bundle-MaCAbF/middleware-insertion-facade.js +++ /dev/null @@ -1,11 +0,0 @@ - import worker, * as OTHER_EXPORTS from "/Users/chadmiller/code/pds-experiment/src/pds.js"; - import * as __MIDDLEWARE_0__ from "/Users/chadmiller/.npm/_npx/32026684e21afda6/node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts"; -import * as __MIDDLEWARE_1__ from "/Users/chadmiller/.npm/_npx/32026684e21afda6/node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts"; - - export * from "/Users/chadmiller/code/pds-experiment/src/pds.js"; - const MIDDLEWARE_TEST_INJECT = "__INJECT_FOR_TESTING_WRANGLER_MIDDLEWARE__"; - export const __INTERNAL_WRANGLER_MIDDLEWARE__ = [ - - __MIDDLEWARE_0__.default,__MIDDLEWARE_1__.default - ] - export default worker; \ No newline at end of file diff --git a/.wrangler/tmp/bundle-MaCAbF/middleware-loader.entry.ts b/.wrangler/tmp/bundle-MaCAbF/middleware-loader.entry.ts deleted file mode 100644 index 5376886..0000000 --- a/.wrangler/tmp/bundle-MaCAbF/middleware-loader.entry.ts +++ /dev/null @@ -1,134 +0,0 @@ -// This loads all middlewares exposed on the middleware object and then starts -// the invocation chain. The big idea is that we can add these to the middleware -// export dynamically through wrangler, or we can potentially let users directly -// add them as a sort of "plugin" system. - -import ENTRY, { __INTERNAL_WRANGLER_MIDDLEWARE__ } from "/Users/chadmiller/code/pds-experiment/.wrangler/tmp/bundle-MaCAbF/middleware-insertion-facade.js"; -import { __facade_invoke__, __facade_register__, Dispatcher } from "/Users/chadmiller/.npm/_npx/32026684e21afda6/node_modules/wrangler/templates/middleware/common.ts"; -import type { WorkerEntrypointConstructor } from "/Users/chadmiller/code/pds-experiment/.wrangler/tmp/bundle-MaCAbF/middleware-insertion-facade.js"; - -// Preserve all the exports from the worker -export * from "/Users/chadmiller/code/pds-experiment/.wrangler/tmp/bundle-MaCAbF/middleware-insertion-facade.js"; - -class __Facade_ScheduledController__ implements ScheduledController { - readonly #noRetry: ScheduledController["noRetry"]; - - constructor( - readonly scheduledTime: number, - readonly cron: string, - noRetry: ScheduledController["noRetry"] - ) { - this.#noRetry = noRetry; - } - - noRetry() { - if (!(this instanceof __Facade_ScheduledController__)) { - throw new TypeError("Illegal invocation"); - } - // Need to call native method immediately in case uncaught error thrown - this.#noRetry(); - } -} - -function wrapExportedHandler(worker: ExportedHandler): ExportedHandler { - // If we don't have any middleware defined, just return the handler as is - if ( - __INTERNAL_WRANGLER_MIDDLEWARE__ === undefined || - __INTERNAL_WRANGLER_MIDDLEWARE__.length === 0 - ) { - return worker; - } - // Otherwise, register all middleware once - for (const middleware of __INTERNAL_WRANGLER_MIDDLEWARE__) { - __facade_register__(middleware); - } - - const fetchDispatcher: ExportedHandlerFetchHandler = function ( - request, - env, - ctx - ) { - if (worker.fetch === undefined) { - throw new Error("Handler does not export a fetch() function."); - } - return worker.fetch(request, env, ctx); - }; - - return { - ...worker, - fetch(request, env, ctx) { - const dispatcher: Dispatcher = function (type, init) { - if (type === "scheduled" && worker.scheduled !== undefined) { - const controller = new __Facade_ScheduledController__( - Date.now(), - init.cron ?? "", - () => {} - ); - return worker.scheduled(controller, env, ctx); - } - }; - return __facade_invoke__(request, env, ctx, dispatcher, fetchDispatcher); - }, - }; -} - -function wrapWorkerEntrypoint( - klass: WorkerEntrypointConstructor -): WorkerEntrypointConstructor { - // If we don't have any middleware defined, just return the handler as is - if ( - __INTERNAL_WRANGLER_MIDDLEWARE__ === undefined || - __INTERNAL_WRANGLER_MIDDLEWARE__.length === 0 - ) { - return klass; - } - // Otherwise, register all middleware once - for (const middleware of __INTERNAL_WRANGLER_MIDDLEWARE__) { - __facade_register__(middleware); - } - - // `extend`ing `klass` here so other RPC methods remain callable - return class extends klass { - #fetchDispatcher: ExportedHandlerFetchHandler> = ( - request, - env, - ctx - ) => { - this.env = env; - this.ctx = ctx; - if (super.fetch === undefined) { - throw new Error("Entrypoint class does not define a fetch() function."); - } - return super.fetch(request); - }; - - #dispatcher: Dispatcher = (type, init) => { - if (type === "scheduled" && super.scheduled !== undefined) { - const controller = new __Facade_ScheduledController__( - Date.now(), - init.cron ?? "", - () => {} - ); - return super.scheduled(controller); - } - }; - - fetch(request: Request) { - return __facade_invoke__( - request, - this.env, - this.ctx, - this.#dispatcher, - this.#fetchDispatcher - ); - } - }; -} - -let WRAPPED_ENTRY: ExportedHandler | WorkerEntrypointConstructor | undefined; -if (typeof ENTRY === "object") { - WRAPPED_ENTRY = wrapExportedHandler(ENTRY); -} else if (typeof ENTRY === "function") { - WRAPPED_ENTRY = wrapWorkerEntrypoint(ENTRY); -} -export default WRAPPED_ENTRY; diff --git a/.wrangler/tmp/dev-qpR91k/pds.js b/.wrangler/tmp/dev-qpR91k/pds.js deleted file mode 100644 index 4555a6a..0000000 --- a/.wrangler/tmp/dev-qpR91k/pds.js +++ /dev/null @@ -1,337 +0,0 @@ -var __defProp = Object.defineProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); - -// .wrangler/tmp/bundle-MaCAbF/checked-fetch.js -var urls = /* @__PURE__ */ new Set(); -function checkURL(request, init) { - const url = request instanceof URL ? request : new URL( - (typeof request === "string" ? new Request(request, init) : request).url - ); - if (url.port && url.port !== "443" && url.protocol === "https:") { - if (!urls.has(url.toString())) { - urls.add(url.toString()); - console.warn( - `WARNING: known issue with \`fetch()\` requests to custom HTTPS ports in published Workers: - - ${url.toString()} - the custom port will be ignored when the Worker is published using the \`wrangler deploy\` command. -` - ); - } - } -} -__name(checkURL, "checkURL"); -globalThis.fetch = new Proxy(globalThis.fetch, { - apply(target, thisArg, argArray) { - const [request, init] = argArray; - checkURL(request, init); - return Reflect.apply(target, thisArg, argArray); - } -}); - -// src/pds.js -function cborEncode(value) { - const parts = []; - function encode(val) { - if (val === null) { - parts.push(246); - } else if (val === true) { - parts.push(245); - } else if (val === false) { - parts.push(244); - } else if (typeof val === "number") { - encodeInteger(val); - } else if (typeof val === "string") { - const bytes = new TextEncoder().encode(val); - encodeHead(3, bytes.length); - parts.push(...bytes); - } else if (val instanceof Uint8Array) { - encodeHead(2, val.length); - parts.push(...val); - } else if (Array.isArray(val)) { - encodeHead(4, val.length); - for (const item of val) encode(item); - } else if (typeof val === "object") { - const keys = Object.keys(val).sort(); - encodeHead(5, keys.length); - for (const key of keys) { - encode(key); - encode(val[key]); - } - } - } - __name(encode, "encode"); - function encodeHead(majorType, length) { - const mt = majorType << 5; - if (length < 24) { - parts.push(mt | length); - } else if (length < 256) { - parts.push(mt | 24, length); - } else if (length < 65536) { - parts.push(mt | 25, length >> 8, length & 255); - } else if (length < 4294967296) { - parts.push(mt | 26, length >> 24 & 255, length >> 16 & 255, length >> 8 & 255, length & 255); - } - } - __name(encodeHead, "encodeHead"); - function encodeInteger(n) { - if (n >= 0) { - encodeHead(0, n); - } else { - encodeHead(1, -n - 1); - } - } - __name(encodeInteger, "encodeInteger"); - encode(value); - return new Uint8Array(parts); -} -__name(cborEncode, "cborEncode"); -async function createCid(bytes) { - const hash = await crypto.subtle.digest("SHA-256", bytes); - const hashBytes = new Uint8Array(hash); - const cid = new Uint8Array(2 + 2 + 32); - cid[0] = 1; - cid[1] = 113; - cid[2] = 18; - cid[3] = 32; - cid.set(hashBytes, 4); - return cid; -} -__name(createCid, "createCid"); -function cidToString(cid) { - return "b" + base32Encode(cid); -} -__name(cidToString, "cidToString"); -function base32Encode(bytes) { - const alphabet = "abcdefghijklmnopqrstuvwxyz234567"; - let result = ""; - let bits = 0; - let value = 0; - for (const byte of bytes) { - value = value << 8 | byte; - bits += 8; - while (bits >= 5) { - bits -= 5; - result += alphabet[value >> bits & 31]; - } - } - if (bits > 0) { - result += alphabet[value << 5 - bits & 31]; - } - return result; -} -__name(base32Encode, "base32Encode"); -var PersonalDataServer = class { - static { - __name(this, "PersonalDataServer"); - } - constructor(state, env) { - this.state = state; - this.sql = state.storage.sql; - } - async fetch(request) { - const url = new URL(request.url); - if (url.pathname === "/test/cbor") { - const encoded = cborEncode({ hello: "world", num: 42 }); - return new Response(encoded, { - headers: { "content-type": "application/cbor" } - }); - } - if (url.pathname === "/test/cid") { - const data = cborEncode({ test: "data" }); - const cid = await createCid(data); - return Response.json({ cid: cidToString(cid) }); - } - return new Response("pds running", { status: 200 }); - } -}; -var pds_default = { - async fetch(request, env) { - const url = new URL(request.url); - const did = url.searchParams.get("did"); - if (!did) { - return new Response("missing did param", { status: 400 }); - } - const id = env.PDS.idFromName(did); - const pds = env.PDS.get(id); - return pds.fetch(request); - } -}; - -// ../../.npm/_npx/32026684e21afda6/node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts -var drainBody = /* @__PURE__ */ __name(async (request, env, _ctx, middlewareCtx) => { - try { - return await middlewareCtx.next(request, env); - } finally { - try { - if (request.body !== null && !request.bodyUsed) { - const reader = request.body.getReader(); - while (!(await reader.read()).done) { - } - } - } catch (e) { - console.error("Failed to drain the unused request body.", e); - } - } -}, "drainBody"); -var middleware_ensure_req_body_drained_default = drainBody; - -// ../../.npm/_npx/32026684e21afda6/node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts -function reduceError(e) { - return { - name: e?.name, - message: e?.message ?? String(e), - stack: e?.stack, - cause: e?.cause === void 0 ? void 0 : reduceError(e.cause) - }; -} -__name(reduceError, "reduceError"); -var jsonError = /* @__PURE__ */ __name(async (request, env, _ctx, middlewareCtx) => { - try { - return await middlewareCtx.next(request, env); - } catch (e) { - const error = reduceError(e); - return Response.json(error, { - status: 500, - headers: { "MF-Experimental-Error-Stack": "true" } - }); - } -}, "jsonError"); -var middleware_miniflare3_json_error_default = jsonError; - -// .wrangler/tmp/bundle-MaCAbF/middleware-insertion-facade.js -var __INTERNAL_WRANGLER_MIDDLEWARE__ = [ - middleware_ensure_req_body_drained_default, - middleware_miniflare3_json_error_default -]; -var middleware_insertion_facade_default = pds_default; - -// ../../.npm/_npx/32026684e21afda6/node_modules/wrangler/templates/middleware/common.ts -var __facade_middleware__ = []; -function __facade_register__(...args) { - __facade_middleware__.push(...args.flat()); -} -__name(__facade_register__, "__facade_register__"); -function __facade_invokeChain__(request, env, ctx, dispatch, middlewareChain) { - const [head, ...tail] = middlewareChain; - const middlewareCtx = { - dispatch, - next(newRequest, newEnv) { - return __facade_invokeChain__(newRequest, newEnv, ctx, dispatch, tail); - } - }; - return head(request, env, ctx, middlewareCtx); -} -__name(__facade_invokeChain__, "__facade_invokeChain__"); -function __facade_invoke__(request, env, ctx, dispatch, finalMiddleware) { - return __facade_invokeChain__(request, env, ctx, dispatch, [ - ...__facade_middleware__, - finalMiddleware - ]); -} -__name(__facade_invoke__, "__facade_invoke__"); - -// .wrangler/tmp/bundle-MaCAbF/middleware-loader.entry.ts -var __Facade_ScheduledController__ = class ___Facade_ScheduledController__ { - constructor(scheduledTime, cron, noRetry) { - this.scheduledTime = scheduledTime; - this.cron = cron; - this.#noRetry = noRetry; - } - static { - __name(this, "__Facade_ScheduledController__"); - } - #noRetry; - noRetry() { - if (!(this instanceof ___Facade_ScheduledController__)) { - throw new TypeError("Illegal invocation"); - } - this.#noRetry(); - } -}; -function wrapExportedHandler(worker) { - if (__INTERNAL_WRANGLER_MIDDLEWARE__ === void 0 || __INTERNAL_WRANGLER_MIDDLEWARE__.length === 0) { - return worker; - } - for (const middleware of __INTERNAL_WRANGLER_MIDDLEWARE__) { - __facade_register__(middleware); - } - const fetchDispatcher = /* @__PURE__ */ __name(function(request, env, ctx) { - if (worker.fetch === void 0) { - throw new Error("Handler does not export a fetch() function."); - } - return worker.fetch(request, env, ctx); - }, "fetchDispatcher"); - return { - ...worker, - fetch(request, env, ctx) { - const dispatcher = /* @__PURE__ */ __name(function(type, init) { - if (type === "scheduled" && worker.scheduled !== void 0) { - const controller = new __Facade_ScheduledController__( - Date.now(), - init.cron ?? "", - () => { - } - ); - return worker.scheduled(controller, env, ctx); - } - }, "dispatcher"); - return __facade_invoke__(request, env, ctx, dispatcher, fetchDispatcher); - } - }; -} -__name(wrapExportedHandler, "wrapExportedHandler"); -function wrapWorkerEntrypoint(klass) { - if (__INTERNAL_WRANGLER_MIDDLEWARE__ === void 0 || __INTERNAL_WRANGLER_MIDDLEWARE__.length === 0) { - return klass; - } - for (const middleware of __INTERNAL_WRANGLER_MIDDLEWARE__) { - __facade_register__(middleware); - } - return class extends klass { - #fetchDispatcher = /* @__PURE__ */ __name((request, env, ctx) => { - this.env = env; - this.ctx = ctx; - if (super.fetch === void 0) { - throw new Error("Entrypoint class does not define a fetch() function."); - } - return super.fetch(request); - }, "#fetchDispatcher"); - #dispatcher = /* @__PURE__ */ __name((type, init) => { - if (type === "scheduled" && super.scheduled !== void 0) { - const controller = new __Facade_ScheduledController__( - Date.now(), - init.cron ?? "", - () => { - } - ); - return super.scheduled(controller); - } - }, "#dispatcher"); - fetch(request) { - return __facade_invoke__( - request, - this.env, - this.ctx, - this.#dispatcher, - this.#fetchDispatcher - ); - } - }; -} -__name(wrapWorkerEntrypoint, "wrapWorkerEntrypoint"); -var WRAPPED_ENTRY; -if (typeof middleware_insertion_facade_default === "object") { - WRAPPED_ENTRY = wrapExportedHandler(middleware_insertion_facade_default); -} else if (typeof middleware_insertion_facade_default === "function") { - WRAPPED_ENTRY = wrapWorkerEntrypoint(middleware_insertion_facade_default); -} -var middleware_loader_entry_default = WRAPPED_ENTRY; -export { - PersonalDataServer, - __INTERNAL_WRANGLER_MIDDLEWARE__, - base32Encode, - cborEncode, - cidToString, - createCid, - middleware_loader_entry_default as default -}; -//# sourceMappingURL=pds.js.map diff --git a/.wrangler/tmp/dev-qpR91k/pds.js.map b/.wrangler/tmp/dev-qpR91k/pds.js.map deleted file mode 100644 index 50520ee..0000000 --- a/.wrangler/tmp/dev-qpR91k/pds.js.map +++ /dev/null @@ -1,8 +0,0 @@ -{ - "version": 3, - "sources": ["../bundle-MaCAbF/checked-fetch.js", "../../../src/pds.js", "../../../../../.npm/_npx/32026684e21afda6/node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts", "../../../../../.npm/_npx/32026684e21afda6/node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts", "../bundle-MaCAbF/middleware-insertion-facade.js", "../../../../../.npm/_npx/32026684e21afda6/node_modules/wrangler/templates/middleware/common.ts", "../bundle-MaCAbF/middleware-loader.entry.ts"], - "sourceRoot": "/Users/chadmiller/code/pds-experiment/.wrangler/tmp/dev-qpR91k", - "sourcesContent": ["const urls = new Set();\n\nfunction checkURL(request, init) {\n\tconst url =\n\t\trequest instanceof URL\n\t\t\t? request\n\t\t\t: new URL(\n\t\t\t\t\t(typeof request === \"string\"\n\t\t\t\t\t\t? new Request(request, init)\n\t\t\t\t\t\t: request\n\t\t\t\t\t).url\n\t\t\t\t);\n\tif (url.port && url.port !== \"443\" && url.protocol === \"https:\") {\n\t\tif (!urls.has(url.toString())) {\n\t\t\turls.add(url.toString());\n\t\t\tconsole.warn(\n\t\t\t\t`WARNING: known issue with \\`fetch()\\` requests to custom HTTPS ports in published Workers:\\n` +\n\t\t\t\t\t` - ${url.toString()} - the custom port will be ignored when the Worker is published using the \\`wrangler deploy\\` command.\\n`\n\t\t\t);\n\t\t}\n\t}\n}\n\nglobalThis.fetch = new Proxy(globalThis.fetch, {\n\tapply(target, thisArg, argArray) {\n\t\tconst [request, init] = argArray;\n\t\tcheckURL(request, init);\n\t\treturn Reflect.apply(target, thisArg, argArray);\n\t},\n});\n", "// === CBOR ENCODING ===\n// Minimal deterministic CBOR (RFC 8949) - sorted keys, minimal integers\n\nfunction cborEncode(value) {\n const parts = []\n\n function encode(val) {\n if (val === null) {\n parts.push(0xf6) // null\n } else if (val === true) {\n parts.push(0xf5) // true\n } else if (val === false) {\n parts.push(0xf4) // false\n } else if (typeof val === 'number') {\n encodeInteger(val)\n } else if (typeof val === 'string') {\n const bytes = new TextEncoder().encode(val)\n encodeHead(3, bytes.length) // major type 3 = text string\n parts.push(...bytes)\n } else if (val instanceof Uint8Array) {\n encodeHead(2, val.length) // major type 2 = byte string\n parts.push(...val)\n } else if (Array.isArray(val)) {\n encodeHead(4, val.length) // major type 4 = array\n for (const item of val) encode(item)\n } else if (typeof val === 'object') {\n // Sort keys for deterministic encoding\n const keys = Object.keys(val).sort()\n encodeHead(5, keys.length) // major type 5 = map\n for (const key of keys) {\n encode(key)\n encode(val[key])\n }\n }\n }\n\n function encodeHead(majorType, length) {\n const mt = majorType << 5\n if (length < 24) {\n parts.push(mt | length)\n } else if (length < 256) {\n parts.push(mt | 24, length)\n } else if (length < 65536) {\n parts.push(mt | 25, length >> 8, length & 0xff)\n } else if (length < 4294967296) {\n parts.push(mt | 26, (length >> 24) & 0xff, (length >> 16) & 0xff, (length >> 8) & 0xff, length & 0xff)\n }\n }\n\n function encodeInteger(n) {\n if (n >= 0) {\n encodeHead(0, n) // major type 0 = unsigned int\n } else {\n encodeHead(1, -n - 1) // major type 1 = negative int\n }\n }\n\n encode(value)\n return new Uint8Array(parts)\n}\n\n// === CID GENERATION ===\n// dag-cbor (0x71) + sha-256 (0x12) + 32 bytes\n\nasync function createCid(bytes) {\n const hash = await crypto.subtle.digest('SHA-256', bytes)\n const hashBytes = new Uint8Array(hash)\n\n // CIDv1: version(1) + codec(dag-cbor=0x71) + multihash(sha256)\n // Multihash: hash-type(0x12) + length(0x20=32) + digest\n const cid = new Uint8Array(2 + 2 + 32)\n cid[0] = 0x01 // CIDv1\n cid[1] = 0x71 // dag-cbor codec\n cid[2] = 0x12 // sha-256\n cid[3] = 0x20 // 32 bytes\n cid.set(hashBytes, 4)\n\n return cid\n}\n\nfunction cidToString(cid) {\n // base32lower encoding for CIDv1\n return 'b' + base32Encode(cid)\n}\n\nfunction base32Encode(bytes) {\n const alphabet = 'abcdefghijklmnopqrstuvwxyz234567'\n let result = ''\n let bits = 0\n let value = 0\n\n for (const byte of bytes) {\n value = (value << 8) | byte\n bits += 8\n while (bits >= 5) {\n bits -= 5\n result += alphabet[(value >> bits) & 31]\n }\n }\n\n if (bits > 0) {\n result += alphabet[(value << (5 - bits)) & 31]\n }\n\n return result\n}\n\nexport class PersonalDataServer {\n constructor(state, env) {\n this.state = state\n this.sql = state.storage.sql\n }\n\n async fetch(request) {\n const url = new URL(request.url)\n if (url.pathname === '/test/cbor') {\n const encoded = cborEncode({ hello: 'world', num: 42 })\n return new Response(encoded, {\n headers: { 'content-type': 'application/cbor' }\n })\n }\n if (url.pathname === '/test/cid') {\n const data = cborEncode({ test: 'data' })\n const cid = await createCid(data)\n return Response.json({ cid: cidToString(cid) })\n }\n return new Response('pds running', { status: 200 })\n }\n}\n\nexport default {\n async fetch(request, env) {\n const url = new URL(request.url)\n const did = url.searchParams.get('did')\n\n if (!did) {\n return new Response('missing did param', { status: 400 })\n }\n\n const id = env.PDS.idFromName(did)\n const pds = env.PDS.get(id)\n return pds.fetch(request)\n }\n}\n\n// Export utilities for testing\nexport { cborEncode, createCid, cidToString, base32Encode }\n", "import type { Middleware } from \"./common\";\n\nconst drainBody: Middleware = async (request, env, _ctx, middlewareCtx) => {\n\ttry {\n\t\treturn await middlewareCtx.next(request, env);\n\t} finally {\n\t\ttry {\n\t\t\tif (request.body !== null && !request.bodyUsed) {\n\t\t\t\tconst reader = request.body.getReader();\n\t\t\t\twhile (!(await reader.read()).done) {}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(\"Failed to drain the unused request body.\", e);\n\t\t}\n\t}\n};\n\nexport default drainBody;\n", "import type { Middleware } from \"./common\";\n\ninterface JsonError {\n\tmessage?: string;\n\tname?: string;\n\tstack?: string;\n\tcause?: JsonError;\n}\n\nfunction reduceError(e: any): JsonError {\n\treturn {\n\t\tname: e?.name,\n\t\tmessage: e?.message ?? String(e),\n\t\tstack: e?.stack,\n\t\tcause: e?.cause === undefined ? undefined : reduceError(e.cause),\n\t};\n}\n\n// See comment in `bundle.ts` for details on why this is needed\nconst jsonError: Middleware = async (request, env, _ctx, middlewareCtx) => {\n\ttry {\n\t\treturn await middlewareCtx.next(request, env);\n\t} catch (e: any) {\n\t\tconst error = reduceError(e);\n\t\treturn Response.json(error, {\n\t\t\tstatus: 500,\n\t\t\theaders: { \"MF-Experimental-Error-Stack\": \"true\" },\n\t\t});\n\t}\n};\n\nexport default jsonError;\n", "\t\t\t\timport worker, * as OTHER_EXPORTS from \"/Users/chadmiller/code/pds-experiment/src/pds.js\";\n\t\t\t\timport * as __MIDDLEWARE_0__ from \"/Users/chadmiller/.npm/_npx/32026684e21afda6/node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts\";\nimport * as __MIDDLEWARE_1__ from \"/Users/chadmiller/.npm/_npx/32026684e21afda6/node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts\";\n\n\t\t\t\texport * from \"/Users/chadmiller/code/pds-experiment/src/pds.js\";\n\t\t\t\tconst MIDDLEWARE_TEST_INJECT = \"__INJECT_FOR_TESTING_WRANGLER_MIDDLEWARE__\";\n\t\t\t\texport const __INTERNAL_WRANGLER_MIDDLEWARE__ = [\n\t\t\t\t\t\n\t\t\t\t\t__MIDDLEWARE_0__.default,__MIDDLEWARE_1__.default\n\t\t\t\t]\n\t\t\t\texport default worker;", "export type Awaitable = T | Promise;\n// TODO: allow dispatching more events?\nexport type Dispatcher = (\n\ttype: \"scheduled\",\n\tinit: { cron?: string }\n) => Awaitable;\n\nexport type IncomingRequest = Request<\n\tunknown,\n\tIncomingRequestCfProperties\n>;\n\nexport interface MiddlewareContext {\n\tdispatch: Dispatcher;\n\tnext(request: IncomingRequest, env: any): Awaitable;\n}\n\nexport type Middleware = (\n\trequest: IncomingRequest,\n\tenv: any,\n\tctx: ExecutionContext,\n\tmiddlewareCtx: MiddlewareContext\n) => Awaitable;\n\nconst __facade_middleware__: Middleware[] = [];\n\n// The register functions allow for the insertion of one or many middleware,\n// We register internal middleware first in the stack, but have no way of controlling\n// the order that addMiddleware is run in service workers so need an internal function.\nexport function __facade_register__(...args: (Middleware | Middleware[])[]) {\n\t__facade_middleware__.push(...args.flat());\n}\nexport function __facade_registerInternal__(\n\t...args: (Middleware | Middleware[])[]\n) {\n\t__facade_middleware__.unshift(...args.flat());\n}\n\nfunction __facade_invokeChain__(\n\trequest: IncomingRequest,\n\tenv: any,\n\tctx: ExecutionContext,\n\tdispatch: Dispatcher,\n\tmiddlewareChain: Middleware[]\n): Awaitable {\n\tconst [head, ...tail] = middlewareChain;\n\tconst middlewareCtx: MiddlewareContext = {\n\t\tdispatch,\n\t\tnext(newRequest, newEnv) {\n\t\t\treturn __facade_invokeChain__(newRequest, newEnv, ctx, dispatch, tail);\n\t\t},\n\t};\n\treturn head(request, env, ctx, middlewareCtx);\n}\n\nexport function __facade_invoke__(\n\trequest: IncomingRequest,\n\tenv: any,\n\tctx: ExecutionContext,\n\tdispatch: Dispatcher,\n\tfinalMiddleware: Middleware\n): Awaitable {\n\treturn __facade_invokeChain__(request, env, ctx, dispatch, [\n\t\t...__facade_middleware__,\n\t\tfinalMiddleware,\n\t]);\n}\n", "// This loads all middlewares exposed on the middleware object and then starts\n// the invocation chain. The big idea is that we can add these to the middleware\n// export dynamically through wrangler, or we can potentially let users directly\n// add them as a sort of \"plugin\" system.\n\nimport ENTRY, { __INTERNAL_WRANGLER_MIDDLEWARE__ } from \"/Users/chadmiller/code/pds-experiment/.wrangler/tmp/bundle-MaCAbF/middleware-insertion-facade.js\";\nimport { __facade_invoke__, __facade_register__, Dispatcher } from \"/Users/chadmiller/.npm/_npx/32026684e21afda6/node_modules/wrangler/templates/middleware/common.ts\";\nimport type { WorkerEntrypointConstructor } from \"/Users/chadmiller/code/pds-experiment/.wrangler/tmp/bundle-MaCAbF/middleware-insertion-facade.js\";\n\n// Preserve all the exports from the worker\nexport * from \"/Users/chadmiller/code/pds-experiment/.wrangler/tmp/bundle-MaCAbF/middleware-insertion-facade.js\";\n\nclass __Facade_ScheduledController__ implements ScheduledController {\n\treadonly #noRetry: ScheduledController[\"noRetry\"];\n\n\tconstructor(\n\t\treadonly scheduledTime: number,\n\t\treadonly cron: string,\n\t\tnoRetry: ScheduledController[\"noRetry\"]\n\t) {\n\t\tthis.#noRetry = noRetry;\n\t}\n\n\tnoRetry() {\n\t\tif (!(this instanceof __Facade_ScheduledController__)) {\n\t\t\tthrow new TypeError(\"Illegal invocation\");\n\t\t}\n\t\t// Need to call native method immediately in case uncaught error thrown\n\t\tthis.#noRetry();\n\t}\n}\n\nfunction wrapExportedHandler(worker: ExportedHandler): ExportedHandler {\n\t// If we don't have any middleware defined, just return the handler as is\n\tif (\n\t\t__INTERNAL_WRANGLER_MIDDLEWARE__ === undefined ||\n\t\t__INTERNAL_WRANGLER_MIDDLEWARE__.length === 0\n\t) {\n\t\treturn worker;\n\t}\n\t// Otherwise, register all middleware once\n\tfor (const middleware of __INTERNAL_WRANGLER_MIDDLEWARE__) {\n\t\t__facade_register__(middleware);\n\t}\n\n\tconst fetchDispatcher: ExportedHandlerFetchHandler = function (\n\t\trequest,\n\t\tenv,\n\t\tctx\n\t) {\n\t\tif (worker.fetch === undefined) {\n\t\t\tthrow new Error(\"Handler does not export a fetch() function.\");\n\t\t}\n\t\treturn worker.fetch(request, env, ctx);\n\t};\n\n\treturn {\n\t\t...worker,\n\t\tfetch(request, env, ctx) {\n\t\t\tconst dispatcher: Dispatcher = function (type, init) {\n\t\t\t\tif (type === \"scheduled\" && worker.scheduled !== undefined) {\n\t\t\t\t\tconst controller = new __Facade_ScheduledController__(\n\t\t\t\t\t\tDate.now(),\n\t\t\t\t\t\tinit.cron ?? \"\",\n\t\t\t\t\t\t() => {}\n\t\t\t\t\t);\n\t\t\t\t\treturn worker.scheduled(controller, env, ctx);\n\t\t\t\t}\n\t\t\t};\n\t\t\treturn __facade_invoke__(request, env, ctx, dispatcher, fetchDispatcher);\n\t\t},\n\t};\n}\n\nfunction wrapWorkerEntrypoint(\n\tklass: WorkerEntrypointConstructor\n): WorkerEntrypointConstructor {\n\t// If we don't have any middleware defined, just return the handler as is\n\tif (\n\t\t__INTERNAL_WRANGLER_MIDDLEWARE__ === undefined ||\n\t\t__INTERNAL_WRANGLER_MIDDLEWARE__.length === 0\n\t) {\n\t\treturn klass;\n\t}\n\t// Otherwise, register all middleware once\n\tfor (const middleware of __INTERNAL_WRANGLER_MIDDLEWARE__) {\n\t\t__facade_register__(middleware);\n\t}\n\n\t// `extend`ing `klass` here so other RPC methods remain callable\n\treturn class extends klass {\n\t\t#fetchDispatcher: ExportedHandlerFetchHandler> = (\n\t\t\trequest,\n\t\t\tenv,\n\t\t\tctx\n\t\t) => {\n\t\t\tthis.env = env;\n\t\t\tthis.ctx = ctx;\n\t\t\tif (super.fetch === undefined) {\n\t\t\t\tthrow new Error(\"Entrypoint class does not define a fetch() function.\");\n\t\t\t}\n\t\t\treturn super.fetch(request);\n\t\t};\n\n\t\t#dispatcher: Dispatcher = (type, init) => {\n\t\t\tif (type === \"scheduled\" && super.scheduled !== undefined) {\n\t\t\t\tconst controller = new __Facade_ScheduledController__(\n\t\t\t\t\tDate.now(),\n\t\t\t\t\tinit.cron ?? \"\",\n\t\t\t\t\t() => {}\n\t\t\t\t);\n\t\t\t\treturn super.scheduled(controller);\n\t\t\t}\n\t\t};\n\n\t\tfetch(request: Request) {\n\t\t\treturn __facade_invoke__(\n\t\t\t\trequest,\n\t\t\t\tthis.env,\n\t\t\t\tthis.ctx,\n\t\t\t\tthis.#dispatcher,\n\t\t\t\tthis.#fetchDispatcher\n\t\t\t);\n\t\t}\n\t};\n}\n\nlet WRAPPED_ENTRY: ExportedHandler | WorkerEntrypointConstructor | undefined;\nif (typeof ENTRY === \"object\") {\n\tWRAPPED_ENTRY = wrapExportedHandler(ENTRY);\n} else if (typeof ENTRY === \"function\") {\n\tWRAPPED_ENTRY = wrapWorkerEntrypoint(ENTRY);\n}\nexport default WRAPPED_ENTRY;\n"], - "mappings": ";;;;AAAA,IAAM,OAAO,oBAAI,IAAI;AAErB,SAAS,SAAS,SAAS,MAAM;AAChC,QAAM,MACL,mBAAmB,MAChB,UACA,IAAI;AAAA,KACH,OAAO,YAAY,WACjB,IAAI,QAAQ,SAAS,IAAI,IACzB,SACD;AAAA,EACH;AACH,MAAI,IAAI,QAAQ,IAAI,SAAS,SAAS,IAAI,aAAa,UAAU;AAChE,QAAI,CAAC,KAAK,IAAI,IAAI,SAAS,CAAC,GAAG;AAC9B,WAAK,IAAI,IAAI,SAAS,C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