.wrangler/state/v3/do/atproto-pds-PersonalDataServer/d67d37442b3ca7789897149c593e43bcf1fd6a9933be25596eb0cbe4c6a0783e.sqlite
.wrangler/state/v3/do/atproto-pds-PersonalDataServer/d67d37442b3ca7789897149c593e43bcf1fd6a9933be25596eb0cbe4c6a0783e.sqlite
This is a binary file and will not be displayed.
-30
.wrangler/tmp/bundle-MaCAbF/checked-fetch.js
-30
.wrangler/tmp/bundle-MaCAbF/checked-fetch.js
···
1
-
const urls = new Set();
2
-
3
-
function checkURL(request, init) {
4
-
const url =
5
-
request instanceof URL
6
-
? request
7
-
: new URL(
8
-
(typeof request === "string"
9
-
? new Request(request, init)
10
-
: request
11
-
).url
12
-
);
13
-
if (url.port && url.port !== "443" && url.protocol === "https:") {
14
-
if (!urls.has(url.toString())) {
15
-
urls.add(url.toString());
16
-
console.warn(
17
-
`WARNING: known issue with \`fetch()\` requests to custom HTTPS ports in published Workers:\n` +
18
-
` - ${url.toString()} - the custom port will be ignored when the Worker is published using the \`wrangler deploy\` command.\n`
19
-
);
20
-
}
21
-
}
22
-
}
23
-
24
-
globalThis.fetch = new Proxy(globalThis.fetch, {
25
-
apply(target, thisArg, argArray) {
26
-
const [request, init] = argArray;
27
-
checkURL(request, init);
28
-
return Reflect.apply(target, thisArg, argArray);
29
-
},
30
-
});
···
-11
.wrangler/tmp/bundle-MaCAbF/middleware-insertion-facade.js
-11
.wrangler/tmp/bundle-MaCAbF/middleware-insertion-facade.js
···
1
-
import worker, * as OTHER_EXPORTS from "/Users/chadmiller/code/pds-experiment/src/pds.js";
2
-
import * as __MIDDLEWARE_0__ from "/Users/chadmiller/.npm/_npx/32026684e21afda6/node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts";
3
-
import * as __MIDDLEWARE_1__ from "/Users/chadmiller/.npm/_npx/32026684e21afda6/node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts";
4
-
5
-
export * from "/Users/chadmiller/code/pds-experiment/src/pds.js";
6
-
const MIDDLEWARE_TEST_INJECT = "__INJECT_FOR_TESTING_WRANGLER_MIDDLEWARE__";
7
-
export const __INTERNAL_WRANGLER_MIDDLEWARE__ = [
8
-
9
-
__MIDDLEWARE_0__.default,__MIDDLEWARE_1__.default
10
-
]
11
-
export default worker;
···
-134
.wrangler/tmp/bundle-MaCAbF/middleware-loader.entry.ts
-134
.wrangler/tmp/bundle-MaCAbF/middleware-loader.entry.ts
···
1
-
// This loads all middlewares exposed on the middleware object and then starts
2
-
// the invocation chain. The big idea is that we can add these to the middleware
3
-
// export dynamically through wrangler, or we can potentially let users directly
4
-
// add them as a sort of "plugin" system.
5
-
6
-
import ENTRY, { __INTERNAL_WRANGLER_MIDDLEWARE__ } from "/Users/chadmiller/code/pds-experiment/.wrangler/tmp/bundle-MaCAbF/middleware-insertion-facade.js";
7
-
import { __facade_invoke__, __facade_register__, Dispatcher } from "/Users/chadmiller/.npm/_npx/32026684e21afda6/node_modules/wrangler/templates/middleware/common.ts";
8
-
import type { WorkerEntrypointConstructor } from "/Users/chadmiller/code/pds-experiment/.wrangler/tmp/bundle-MaCAbF/middleware-insertion-facade.js";
9
-
10
-
// Preserve all the exports from the worker
11
-
export * from "/Users/chadmiller/code/pds-experiment/.wrangler/tmp/bundle-MaCAbF/middleware-insertion-facade.js";
12
-
13
-
class __Facade_ScheduledController__ implements ScheduledController {
14
-
readonly #noRetry: ScheduledController["noRetry"];
15
-
16
-
constructor(
17
-
readonly scheduledTime: number,
18
-
readonly cron: string,
19
-
noRetry: ScheduledController["noRetry"]
20
-
) {
21
-
this.#noRetry = noRetry;
22
-
}
23
-
24
-
noRetry() {
25
-
if (!(this instanceof __Facade_ScheduledController__)) {
26
-
throw new TypeError("Illegal invocation");
27
-
}
28
-
// Need to call native method immediately in case uncaught error thrown
29
-
this.#noRetry();
30
-
}
31
-
}
32
-
33
-
function wrapExportedHandler(worker: ExportedHandler): ExportedHandler {
34
-
// If we don't have any middleware defined, just return the handler as is
35
-
if (
36
-
__INTERNAL_WRANGLER_MIDDLEWARE__ === undefined ||
37
-
__INTERNAL_WRANGLER_MIDDLEWARE__.length === 0
38
-
) {
39
-
return worker;
40
-
}
41
-
// Otherwise, register all middleware once
42
-
for (const middleware of __INTERNAL_WRANGLER_MIDDLEWARE__) {
43
-
__facade_register__(middleware);
44
-
}
45
-
46
-
const fetchDispatcher: ExportedHandlerFetchHandler = function (
47
-
request,
48
-
env,
49
-
ctx
50
-
) {
51
-
if (worker.fetch === undefined) {
52
-
throw new Error("Handler does not export a fetch() function.");
53
-
}
54
-
return worker.fetch(request, env, ctx);
55
-
};
56
-
57
-
return {
58
-
...worker,
59
-
fetch(request, env, ctx) {
60
-
const dispatcher: Dispatcher = function (type, init) {
61
-
if (type === "scheduled" && worker.scheduled !== undefined) {
62
-
const controller = new __Facade_ScheduledController__(
63
-
Date.now(),
64
-
init.cron ?? "",
65
-
() => {}
66
-
);
67
-
return worker.scheduled(controller, env, ctx);
68
-
}
69
-
};
70
-
return __facade_invoke__(request, env, ctx, dispatcher, fetchDispatcher);
71
-
},
72
-
};
73
-
}
74
-
75
-
function wrapWorkerEntrypoint(
76
-
klass: WorkerEntrypointConstructor
77
-
): WorkerEntrypointConstructor {
78
-
// If we don't have any middleware defined, just return the handler as is
79
-
if (
80
-
__INTERNAL_WRANGLER_MIDDLEWARE__ === undefined ||
81
-
__INTERNAL_WRANGLER_MIDDLEWARE__.length === 0
82
-
) {
83
-
return klass;
84
-
}
85
-
// Otherwise, register all middleware once
86
-
for (const middleware of __INTERNAL_WRANGLER_MIDDLEWARE__) {
87
-
__facade_register__(middleware);
88
-
}
89
-
90
-
// `extend`ing `klass` here so other RPC methods remain callable
91
-
return class extends klass {
92
-
#fetchDispatcher: ExportedHandlerFetchHandler<Record<string, unknown>> = (
93
-
request,
94
-
env,
95
-
ctx
96
-
) => {
97
-
this.env = env;
98
-
this.ctx = ctx;
99
-
if (super.fetch === undefined) {
100
-
throw new Error("Entrypoint class does not define a fetch() function.");
101
-
}
102
-
return super.fetch(request);
103
-
};
104
-
105
-
#dispatcher: Dispatcher = (type, init) => {
106
-
if (type === "scheduled" && super.scheduled !== undefined) {
107
-
const controller = new __Facade_ScheduledController__(
108
-
Date.now(),
109
-
init.cron ?? "",
110
-
() => {}
111
-
);
112
-
return super.scheduled(controller);
113
-
}
114
-
};
115
-
116
-
fetch(request: Request<unknown, IncomingRequestCfProperties>) {
117
-
return __facade_invoke__(
118
-
request,
119
-
this.env,
120
-
this.ctx,
121
-
this.#dispatcher,
122
-
this.#fetchDispatcher
123
-
);
124
-
}
125
-
};
126
-
}
127
-
128
-
let WRAPPED_ENTRY: ExportedHandler | WorkerEntrypointConstructor | undefined;
129
-
if (typeof ENTRY === "object") {
130
-
WRAPPED_ENTRY = wrapExportedHandler(ENTRY);
131
-
} else if (typeof ENTRY === "function") {
132
-
WRAPPED_ENTRY = wrapWorkerEntrypoint(ENTRY);
133
-
}
134
-
export default WRAPPED_ENTRY;
···
-337
.wrangler/tmp/dev-qpR91k/pds.js
-337
.wrangler/tmp/dev-qpR91k/pds.js
···
1
-
var __defProp = Object.defineProperty;
2
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
-
// .wrangler/tmp/bundle-MaCAbF/checked-fetch.js
5
-
var urls = /* @__PURE__ */ new Set();
6
-
function checkURL(request, init) {
7
-
const url = request instanceof URL ? request : new URL(
8
-
(typeof request === "string" ? new Request(request, init) : request).url
9
-
);
10
-
if (url.port && url.port !== "443" && url.protocol === "https:") {
11
-
if (!urls.has(url.toString())) {
12
-
urls.add(url.toString());
13
-
console.warn(
14
-
`WARNING: known issue with \`fetch()\` requests to custom HTTPS ports in published Workers:
15
-
- ${url.toString()} - the custom port will be ignored when the Worker is published using the \`wrangler deploy\` command.
16
-
`
17
-
);
18
-
}
19
-
}
20
-
}
21
-
__name(checkURL, "checkURL");
22
-
globalThis.fetch = new Proxy(globalThis.fetch, {
23
-
apply(target, thisArg, argArray) {
24
-
const [request, init] = argArray;
25
-
checkURL(request, init);
26
-
return Reflect.apply(target, thisArg, argArray);
27
-
}
28
-
});
29
-
30
-
// src/pds.js
31
-
function cborEncode(value) {
32
-
const parts = [];
33
-
function encode(val) {
34
-
if (val === null) {
35
-
parts.push(246);
36
-
} else if (val === true) {
37
-
parts.push(245);
38
-
} else if (val === false) {
39
-
parts.push(244);
40
-
} else if (typeof val === "number") {
41
-
encodeInteger(val);
42
-
} else if (typeof val === "string") {
43
-
const bytes = new TextEncoder().encode(val);
44
-
encodeHead(3, bytes.length);
45
-
parts.push(...bytes);
46
-
} else if (val instanceof Uint8Array) {
47
-
encodeHead(2, val.length);
48
-
parts.push(...val);
49
-
} else if (Array.isArray(val)) {
50
-
encodeHead(4, val.length);
51
-
for (const item of val) encode(item);
52
-
} else if (typeof val === "object") {
53
-
const keys = Object.keys(val).sort();
54
-
encodeHead(5, keys.length);
55
-
for (const key of keys) {
56
-
encode(key);
57
-
encode(val[key]);
58
-
}
59
-
}
60
-
}
61
-
__name(encode, "encode");
62
-
function encodeHead(majorType, length) {
63
-
const mt = majorType << 5;
64
-
if (length < 24) {
65
-
parts.push(mt | length);
66
-
} else if (length < 256) {
67
-
parts.push(mt | 24, length);
68
-
} else if (length < 65536) {
69
-
parts.push(mt | 25, length >> 8, length & 255);
70
-
} else if (length < 4294967296) {
71
-
parts.push(mt | 26, length >> 24 & 255, length >> 16 & 255, length >> 8 & 255, length & 255);
72
-
}
73
-
}
74
-
__name(encodeHead, "encodeHead");
75
-
function encodeInteger(n) {
76
-
if (n >= 0) {
77
-
encodeHead(0, n);
78
-
} else {
79
-
encodeHead(1, -n - 1);
80
-
}
81
-
}
82
-
__name(encodeInteger, "encodeInteger");
83
-
encode(value);
84
-
return new Uint8Array(parts);
85
-
}
86
-
__name(cborEncode, "cborEncode");
87
-
async function createCid(bytes) {
88
-
const hash = await crypto.subtle.digest("SHA-256", bytes);
89
-
const hashBytes = new Uint8Array(hash);
90
-
const cid = new Uint8Array(2 + 2 + 32);
91
-
cid[0] = 1;
92
-
cid[1] = 113;
93
-
cid[2] = 18;
94
-
cid[3] = 32;
95
-
cid.set(hashBytes, 4);
96
-
return cid;
97
-
}
98
-
__name(createCid, "createCid");
99
-
function cidToString(cid) {
100
-
return "b" + base32Encode(cid);
101
-
}
102
-
__name(cidToString, "cidToString");
103
-
function base32Encode(bytes) {
104
-
const alphabet = "abcdefghijklmnopqrstuvwxyz234567";
105
-
let result = "";
106
-
let bits = 0;
107
-
let value = 0;
108
-
for (const byte of bytes) {
109
-
value = value << 8 | byte;
110
-
bits += 8;
111
-
while (bits >= 5) {
112
-
bits -= 5;
113
-
result += alphabet[value >> bits & 31];
114
-
}
115
-
}
116
-
if (bits > 0) {
117
-
result += alphabet[value << 5 - bits & 31];
118
-
}
119
-
return result;
120
-
}
121
-
__name(base32Encode, "base32Encode");
122
-
var PersonalDataServer = class {
123
-
static {
124
-
__name(this, "PersonalDataServer");
125
-
}
126
-
constructor(state, env) {
127
-
this.state = state;
128
-
this.sql = state.storage.sql;
129
-
}
130
-
async fetch(request) {
131
-
const url = new URL(request.url);
132
-
if (url.pathname === "/test/cbor") {
133
-
const encoded = cborEncode({ hello: "world", num: 42 });
134
-
return new Response(encoded, {
135
-
headers: { "content-type": "application/cbor" }
136
-
});
137
-
}
138
-
if (url.pathname === "/test/cid") {
139
-
const data = cborEncode({ test: "data" });
140
-
const cid = await createCid(data);
141
-
return Response.json({ cid: cidToString(cid) });
142
-
}
143
-
return new Response("pds running", { status: 200 });
144
-
}
145
-
};
146
-
var pds_default = {
147
-
async fetch(request, env) {
148
-
const url = new URL(request.url);
149
-
const did = url.searchParams.get("did");
150
-
if (!did) {
151
-
return new Response("missing did param", { status: 400 });
152
-
}
153
-
const id = env.PDS.idFromName(did);
154
-
const pds = env.PDS.get(id);
155
-
return pds.fetch(request);
156
-
}
157
-
};
158
-
159
-
// ../../.npm/_npx/32026684e21afda6/node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts
160
-
var drainBody = /* @__PURE__ */ __name(async (request, env, _ctx, middlewareCtx) => {
161
-
try {
162
-
return await middlewareCtx.next(request, env);
163
-
} finally {
164
-
try {
165
-
if (request.body !== null && !request.bodyUsed) {
166
-
const reader = request.body.getReader();
167
-
while (!(await reader.read()).done) {
168
-
}
169
-
}
170
-
} catch (e) {
171
-
console.error("Failed to drain the unused request body.", e);
172
-
}
173
-
}
174
-
}, "drainBody");
175
-
var middleware_ensure_req_body_drained_default = drainBody;
176
-
177
-
// ../../.npm/_npx/32026684e21afda6/node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts
178
-
function reduceError(e) {
179
-
return {
180
-
name: e?.name,
181
-
message: e?.message ?? String(e),
182
-
stack: e?.stack,
183
-
cause: e?.cause === void 0 ? void 0 : reduceError(e.cause)
184
-
};
185
-
}
186
-
__name(reduceError, "reduceError");
187
-
var jsonError = /* @__PURE__ */ __name(async (request, env, _ctx, middlewareCtx) => {
188
-
try {
189
-
return await middlewareCtx.next(request, env);
190
-
} catch (e) {
191
-
const error = reduceError(e);
192
-
return Response.json(error, {
193
-
status: 500,
194
-
headers: { "MF-Experimental-Error-Stack": "true" }
195
-
});
196
-
}
197
-
}, "jsonError");
198
-
var middleware_miniflare3_json_error_default = jsonError;
199
-
200
-
// .wrangler/tmp/bundle-MaCAbF/middleware-insertion-facade.js
201
-
var __INTERNAL_WRANGLER_MIDDLEWARE__ = [
202
-
middleware_ensure_req_body_drained_default,
203
-
middleware_miniflare3_json_error_default
204
-
];
205
-
var middleware_insertion_facade_default = pds_default;
206
-
207
-
// ../../.npm/_npx/32026684e21afda6/node_modules/wrangler/templates/middleware/common.ts
208
-
var __facade_middleware__ = [];
209
-
function __facade_register__(...args) {
210
-
__facade_middleware__.push(...args.flat());
211
-
}
212
-
__name(__facade_register__, "__facade_register__");
213
-
function __facade_invokeChain__(request, env, ctx, dispatch, middlewareChain) {
214
-
const [head, ...tail] = middlewareChain;
215
-
const middlewareCtx = {
216
-
dispatch,
217
-
next(newRequest, newEnv) {
218
-
return __facade_invokeChain__(newRequest, newEnv, ctx, dispatch, tail);
219
-
}
220
-
};
221
-
return head(request, env, ctx, middlewareCtx);
222
-
}
223
-
__name(__facade_invokeChain__, "__facade_invokeChain__");
224
-
function __facade_invoke__(request, env, ctx, dispatch, finalMiddleware) {
225
-
return __facade_invokeChain__(request, env, ctx, dispatch, [
226
-
...__facade_middleware__,
227
-
finalMiddleware
228
-
]);
229
-
}
230
-
__name(__facade_invoke__, "__facade_invoke__");
231
-
232
-
// .wrangler/tmp/bundle-MaCAbF/middleware-loader.entry.ts
233
-
var __Facade_ScheduledController__ = class ___Facade_ScheduledController__ {
234
-
constructor(scheduledTime, cron, noRetry) {
235
-
this.scheduledTime = scheduledTime;
236
-
this.cron = cron;
237
-
this.#noRetry = noRetry;
238
-
}
239
-
static {
240
-
__name(this, "__Facade_ScheduledController__");
241
-
}
242
-
#noRetry;
243
-
noRetry() {
244
-
if (!(this instanceof ___Facade_ScheduledController__)) {
245
-
throw new TypeError("Illegal invocation");
246
-
}
247
-
this.#noRetry();
248
-
}
249
-
};
250
-
function wrapExportedHandler(worker) {
251
-
if (__INTERNAL_WRANGLER_MIDDLEWARE__ === void 0 || __INTERNAL_WRANGLER_MIDDLEWARE__.length === 0) {
252
-
return worker;
253
-
}
254
-
for (const middleware of __INTERNAL_WRANGLER_MIDDLEWARE__) {
255
-
__facade_register__(middleware);
256
-
}
257
-
const fetchDispatcher = /* @__PURE__ */ __name(function(request, env, ctx) {
258
-
if (worker.fetch === void 0) {
259
-
throw new Error("Handler does not export a fetch() function.");
260
-
}
261
-
return worker.fetch(request, env, ctx);
262
-
}, "fetchDispatcher");
263
-
return {
264
-
...worker,
265
-
fetch(request, env, ctx) {
266
-
const dispatcher = /* @__PURE__ */ __name(function(type, init) {
267
-
if (type === "scheduled" && worker.scheduled !== void 0) {
268
-
const controller = new __Facade_ScheduledController__(
269
-
Date.now(),
270
-
init.cron ?? "",
271
-
() => {
272
-
}
273
-
);
274
-
return worker.scheduled(controller, env, ctx);
275
-
}
276
-
}, "dispatcher");
277
-
return __facade_invoke__(request, env, ctx, dispatcher, fetchDispatcher);
278
-
}
279
-
};
280
-
}
281
-
__name(wrapExportedHandler, "wrapExportedHandler");
282
-
function wrapWorkerEntrypoint(klass) {
283
-
if (__INTERNAL_WRANGLER_MIDDLEWARE__ === void 0 || __INTERNAL_WRANGLER_MIDDLEWARE__.length === 0) {
284
-
return klass;
285
-
}
286
-
for (const middleware of __INTERNAL_WRANGLER_MIDDLEWARE__) {
287
-
__facade_register__(middleware);
288
-
}
289
-
return class extends klass {
290
-
#fetchDispatcher = /* @__PURE__ */ __name((request, env, ctx) => {
291
-
this.env = env;
292
-
this.ctx = ctx;
293
-
if (super.fetch === void 0) {
294
-
throw new Error("Entrypoint class does not define a fetch() function.");
295
-
}
296
-
return super.fetch(request);
297
-
}, "#fetchDispatcher");
298
-
#dispatcher = /* @__PURE__ */ __name((type, init) => {
299
-
if (type === "scheduled" && super.scheduled !== void 0) {
300
-
const controller = new __Facade_ScheduledController__(
301
-
Date.now(),
302
-
init.cron ?? "",
303
-
() => {
304
-
}
305
-
);
306
-
return super.scheduled(controller);
307
-
}
308
-
}, "#dispatcher");
309
-
fetch(request) {
310
-
return __facade_invoke__(
311
-
request,
312
-
this.env,
313
-
this.ctx,
314
-
this.#dispatcher,
315
-
this.#fetchDispatcher
316
-
);
317
-
}
318
-
};
319
-
}
320
-
__name(wrapWorkerEntrypoint, "wrapWorkerEntrypoint");
321
-
var WRAPPED_ENTRY;
322
-
if (typeof middleware_insertion_facade_default === "object") {
323
-
WRAPPED_ENTRY = wrapExportedHandler(middleware_insertion_facade_default);
324
-
} else if (typeof middleware_insertion_facade_default === "function") {
325
-
WRAPPED_ENTRY = wrapWorkerEntrypoint(middleware_insertion_facade_default);
326
-
}
327
-
var middleware_loader_entry_default = WRAPPED_ENTRY;
328
-
export {
329
-
PersonalDataServer,
330
-
__INTERNAL_WRANGLER_MIDDLEWARE__,
331
-
base32Encode,
332
-
cborEncode,
333
-
cidToString,
334
-
createCid,
335
-
middleware_loader_entry_default as default
336
-
};
337
-
//# sourceMappingURL=pds.js.map
···
-8
.wrangler/tmp/dev-qpR91k/pds.js.map
-8
.wrangler/tmp/dev-qpR91k/pds.js.map
···
1
-
{
2
-
"version": 3,
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"],
4
-
"sourceRoot": "/Users/chadmiller/code/pds-experiment/.wrangler/tmp/dev-qpR91k",
5
-
"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> = T | Promise<T>;\n// TODO: allow dispatching more events?\nexport type Dispatcher = (\n\ttype: \"scheduled\",\n\tinit: { cron?: string }\n) => Awaitable<void>;\n\nexport type IncomingRequest = Request<\n\tunknown,\n\tIncomingRequestCfProperties<unknown>\n>;\n\nexport interface MiddlewareContext {\n\tdispatch: Dispatcher;\n\tnext(request: IncomingRequest, env: any): Awaitable<Response>;\n}\n\nexport type Middleware = (\n\trequest: IncomingRequest,\n\tenv: any,\n\tctx: ExecutionContext,\n\tmiddlewareCtx: MiddlewareContext\n) => Awaitable<Response>;\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<Response> {\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<Response> {\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<Record<string, unknown>> = (\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<unknown, IncomingRequestCfProperties>) {\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"],
6
-
"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,CAAC;AACvB,cAAQ;AAAA,QACP;AAAA,KACO,IAAI,SAAS,CAAC;AAAA;AAAA,MACtB;AAAA,IACD;AAAA,EACD;AACD;AAnBS;AAqBT,WAAW,QAAQ,IAAI,MAAM,WAAW,OAAO;AAAA,EAC9C,MAAM,QAAQ,SAAS,UAAU;AAChC,UAAM,CAAC,SAAS,IAAI,IAAI;AACxB,aAAS,SAAS,IAAI;AACtB,WAAO,QAAQ,MAAM,QAAQ,SAAS,QAAQ;AAAA,EAC/C;AACD,CAAC;;;AC1BD,SAAS,WAAW,OAAO;AACzB,QAAM,QAAQ,CAAC;AAEf,WAAS,OAAO,KAAK;AACnB,QAAI,QAAQ,MAAM;AAChB,YAAM,KAAK,GAAI;AAAA,IACjB,WAAW,QAAQ,MAAM;AACvB,YAAM,KAAK,GAAI;AAAA,IACjB,WAAW,QAAQ,OAAO;AACxB,YAAM,KAAK,GAAI;AAAA,IACjB,WAAW,OAAO,QAAQ,UAAU;AAClC,oBAAc,GAAG;AAAA,IACnB,WAAW,OAAO,QAAQ,UAAU;AAClC,YAAM,QAAQ,IAAI,YAAY,EAAE,OAAO,GAAG;AAC1C,iBAA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