Skip to content

Commit

Permalink
Revert "Updated @fedify/fedify to 0.12.1 (#7)"
Browse files Browse the repository at this point in the history
This reverts commit e7a4873.
  • Loading branch information
allouis committed Jul 30, 2024
1 parent e7a4873 commit 1e30707
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 56 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"typescript": "5.4.5"
},
"dependencies": {
"@fedify/fedify": "0.12.1",
"@fedify/fedify": "0.11.0-dev.223",
"@hono/node-server": "1.11.1",
"@sentry/node": "8.13.0",
"hono": "4.4.6",
Expand Down
11 changes: 5 additions & 6 deletions src/dispatchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
Note,
Activity,
Update,
Context,
} from '@fedify/fedify';
import { v4 as uuidv4 } from 'uuid';
import { addToList } from './kv-helpers';
Expand All @@ -29,7 +28,7 @@ export async function actorDispatcher(
return person;
}

export async function keypairDispatcher(ctx: Context<ContextData>, handle: string) {
export async function keypairDispatcher(ctx: ContextData, handle: string) {
if (handle !== 'index') return [];

const data = await getUserKeypair(ctx, handle);
Expand All @@ -40,7 +39,7 @@ export async function keypairDispatcher(ctx: Context<ContextData>, handle: strin
}

export async function handleFollow(
ctx: Context<ContextData>,
ctx: RequestContext<ContextData>,
follow: Follow,
) {
console.log('Handling Follow');
Expand Down Expand Up @@ -77,7 +76,7 @@ export async function handleFollow(
}

export async function handleAccept(
ctx: Context<ContextData>,
ctx: RequestContext<ContextData>,
accept: Accept,
) {
console.log('Handling Accept');
Expand Down Expand Up @@ -109,7 +108,7 @@ export async function handleAccept(
}

export async function handleCreate(
ctx: Context<ContextData>,
ctx: RequestContext<ContextData>,
create: Create,
) {
console.log('Handling Create');
Expand Down Expand Up @@ -137,7 +136,7 @@ export async function handleCreate(
}

export async function inboxErrorHandler(
ctx: Context<ContextData>,
ctx: RequestContext<ContextData>,
error: unknown,
) {
console.error('Error handling incoming activity');
Expand Down
7 changes: 3 additions & 4 deletions src/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
generateCryptoKeyPair,
exportJwk,
importJwk,
Context,
} from '@fedify/fedify';
import { ContextData } from './app';

Expand Down Expand Up @@ -79,8 +78,8 @@ export async function getUserData(ctx: RequestContext<ContextData>, handle: stri
return data;
}

export async function getUserKeypair(ctx: Context<ContextData>, handle: string) {
const existing = await ctx.data.db.get<{ publicKey: any; privateKey: any }>([
export async function getUserKeypair(ctx: ContextData, handle: string) {
const existing = await ctx.db.get<{ publicKey: any; privateKey: any }>([
'keypair',
handle,
]);
Expand All @@ -99,7 +98,7 @@ export async function getUserKeypair(ctx: Context<ContextData>, handle: string)
privateKey: keys.privateKey,
};

await ctx.data.db.set(['keypair', handle], {
await ctx.db.set(['keypair', handle], {
publicKey: await exportJwk(data.publicKey),
privateKey: await exportJwk(data.privateKey),
});
Expand Down
52 changes: 7 additions & 45 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,13 @@
resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.1.tgz#b9da6a878a371829a0502c9b6c1c143ef6663f4d"
integrity sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==

"@fedify/fedify@0.12.1":
version "0.12.1"
resolved "https://registry.yarnpkg.com/@fedify/fedify/-/fedify-0.12.1.tgz#6aa0decaa8d435a0e597bf689468c4a32502ce9c"
integrity sha512-d0NLlraraq2A3rSnhWAvZd4tk0UDYgK7Q8/SFkLBWYmVNLsTTGby4R6ejo3GpOw10fjRux2KTJcoHlvX6lgToQ==
"@fedify/fedify@0.11.0-dev.223":
version "0.11.0-dev.223"
resolved "https://registry.yarnpkg.com/@fedify/fedify/-/fedify-0.11.0-dev.223.tgz#a9796a2ecd1e1517af67c32d87252672eb0b31de"
integrity sha512-p9WqdgPvKmzX1rsmQhNUZv+Z9BNs5T9DZbCJ55XfS0N0T6xOUTHeMty6B8hWOYNdtatFIaWAaTIcwOIFBlqm1Q==
dependencies:
"@deno/shim-crypto" "~0.3.1"
"@deno/shim-deno" "~0.18.0"
"@hugoalh/http-header-link" "^1.0.2"
"@js-temporal/polyfill" "^0.4.4"
"@logtape/logtape" "^0.4.0"
"@phensley/language-tag" "^1.8.1"
Expand All @@ -180,18 +179,6 @@
resolved "https://registry.yarnpkg.com/@hono/node-server/-/node-server-1.11.1.tgz#f4c7bea7f3d52760b1950d6b8aeb900cc59142d3"
integrity sha512-GW1Iomhmm1o4Z+X57xGby8A35Cu9UZLL7pSMdqDBkD99U5cywff8F+8hLk5aBTzNubnsFAvWQ/fZjNwPsEn9lA==

"@hugoalh/http-header-link@^1.0.2":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@hugoalh/http-header-link/-/http-header-link-1.0.2.tgz#d3d35e960b2c2c024f903b2c8718c6b4d119b85c"
integrity sha512-q28PYAwW2OtuNqJnYKqFPod9QWpqSkvPQXsY7Qo+IC+6mk4vZyb0m9UqH1zL/PD7knP/YJ9qr4amJAxe1lmfkg==
dependencies:
"@hugoalh/is-string-singleline" "1.0.2"

"@hugoalh/[email protected]":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@hugoalh/is-string-singleline/-/is-string-singleline-1.0.2.tgz#b123d9c06940cb08ce372ad3512ea3c893c6b78d"
integrity sha512-58tr/0q1D+2sB37ghYKPGR82XpNp/Lo2lbxumCX9KXQ6u0aZm1p4KIl3XW5R23m11znflKbsuZZyWv7cOqkm9Q==

"@isaacs/cliui@^8.0.2":
version "8.0.2"
resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550"
Expand Down Expand Up @@ -1925,16 +1912,7 @@ sqlstring@^2.3.2:
resolved "https://registry.yarnpkg.com/sqlstring/-/sqlstring-2.3.3.tgz#2ddc21f03bce2c387ed60680e739922c65751d0c"
integrity sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==

"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand All @@ -1952,14 +1930,7 @@ string-width@^5.0.1, string-width@^5.1.2:
emoji-regex "^9.2.2"
strip-ansi "^7.0.1"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand Down Expand Up @@ -2120,16 +2091,7 @@ [email protected]:
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343"
integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand Down

0 comments on commit 1e30707

Please sign in to comment.