@getcirrus/pds 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2931,7 +2931,7 @@ async function resetMigration(c, accountDO) {
2931
2931
 
2932
2932
  //#endregion
2933
2933
  //#region package.json
2934
- var version = "0.3.0";
2934
+ var version = "0.4.0";
2935
2935
 
2936
2936
  //#endregion
2937
2937
  //#region src/index.ts
@@ -3069,9 +3069,21 @@ app.get("/xrpc/com.atproto.sync.subscribeRepos", async (c) => {
3069
3069
  }, 400);
3070
3070
  return getAccountDO(c.env).fetch(c.req.raw);
3071
3071
  });
3072
- app.get("/xrpc/com.atproto.repo.describeRepo", (c) => describeRepo(c, getAccountDO(c.env)));
3073
- app.get("/xrpc/com.atproto.repo.getRecord", (c) => getRecord(c, getAccountDO(c.env)));
3074
- app.get("/xrpc/com.atproto.repo.listRecords", (c) => listRecords(c, getAccountDO(c.env)));
3072
+ app.use("/xrpc/com.atproto.repo.describeRepo", async (c, next) => {
3073
+ const requestedRepo = c.req.query("repo");
3074
+ if (!requestedRepo || requestedRepo === c.env.DID) return describeRepo(c, getAccountDO(c.env));
3075
+ await next();
3076
+ });
3077
+ app.use("/xrpc/com.atproto.repo.getRecord", async (c, next) => {
3078
+ const requestedRepo = c.req.query("repo");
3079
+ if (!requestedRepo || requestedRepo === c.env.DID) return getRecord(c, getAccountDO(c.env));
3080
+ await next();
3081
+ });
3082
+ app.use("/xrpc/com.atproto.repo.listRecords", async (c, next) => {
3083
+ const requestedRepo = c.req.query("repo");
3084
+ if (!requestedRepo || requestedRepo === c.env.DID) return listRecords(c, getAccountDO(c.env));
3085
+ await next();
3086
+ });
3075
3087
  app.post("/xrpc/com.atproto.repo.createRecord", requireAuth, (c) => createRecord(c, getAccountDO(c.env)));
3076
3088
  app.post("/xrpc/com.atproto.repo.deleteRecord", requireAuth, (c) => deleteRecord(c, getAccountDO(c.env)));
3077
3089
  app.post("/xrpc/com.atproto.repo.uploadBlob", requireAuth, (c) => uploadBlob(c, getAccountDO(c.env)));
@@ -3112,7 +3124,7 @@ app.get("/xrpc/app.bsky.ageassurance.getState", requireAuth, (c) => {
3112
3124
  metadata: { accountCreatedAt: (/* @__PURE__ */ new Date()).toISOString() }
3113
3125
  });
3114
3126
  });
3115
- app.post("/admin/emit-identity", requireAuth, async (c) => {
3127
+ app.post("/xrpc/gg.mk.experimental.emitIdentityEvent", requireAuth, async (c) => {
3116
3128
  const result = await getAccountDO(c.env).rpcEmitIdentityEvent(c.env.HANDLE);
3117
3129
  return c.json(result);
3118
3130
  });