Pronouns labels on Bluesky

remove useless await

Changed files
+44 -44
src
+41 -41
package-lock.json
···
"license": "MIT"
},
"node_modules/@atcute/bluesky": {
-
"version": "1.0.6",
-
"resolved": "https://registry.npmjs.org/@atcute/bluesky/-/bluesky-1.0.6.tgz",
-
"integrity": "sha512-RVhFwleInQYj5znVFRRL7Buun3PTTWuC1T0dWlEamkuDrMlmnXZ4LpzERMRyBnvMpFWDJGE2wJfKYrHNAWmY+g==",
+
"version": "1.0.7",
+
"resolved": "https://registry.npmjs.org/@atcute/bluesky/-/bluesky-1.0.7.tgz",
+
"integrity": "sha512-2jPHzl7WbcqRtcAXanJy4Lp638ujqnoGmPCPmBlmpEDP34D7EVKQqjN/mlvglb5n539dThA9xlSgIS8yOxwzDA==",
"license": "MIT",
"peerDependencies": {
"@atcute/client": "^1.0.0 || ^2.0.0"
···
}
},
"node_modules/@atcute/client": {
-
"version": "2.0.1",
-
"resolved": "https://registry.npmjs.org/@atcute/client/-/client-2.0.1.tgz",
-
"integrity": "sha512-M4q0QchcjcPTypgXTKc4MO06eJMno5op14qHAMWhKbxROOnxnhLfjG9rbcNr7nOycQb5THmUIEAwvvabrv1AjA==",
+
"version": "2.0.2",
+
"resolved": "https://registry.npmjs.org/@atcute/client/-/client-2.0.2.tgz",
+
"integrity": "sha512-bTGoo8cs0B0gXLwI8YYaFayjDIlo8V1wxgng3HkA+jyz22wCh8aL0/4F9Tt4GDKXGCgf+/6IHg1M6uGOX8JVSw==",
"license": "MIT"
},
"node_modules/@atcute/varint": {
···
"license": "MIT"
},
"node_modules/@atproto/api": {
-
"version": "0.13.7",
-
"resolved": "https://registry.npmjs.org/@atproto/api/-/api-0.13.7.tgz",
-
"integrity": "sha512-41kSLmFWDbuPOenb52WRq1lnBkSZrL+X29tWcvEt6SZXK4xBoKAalw1MjF+oabhzff12iMtNaNvmmt2fu1L+cw==",
+
"version": "0.13.8",
+
"resolved": "https://registry.npmjs.org/@atproto/api/-/api-0.13.8.tgz",
+
"integrity": "sha512-1RlvMg8iAT5k3F0U3549ct9+jXthlXtfFXIfTXLyXXFe9Exfvmr7ZJ1ra41vU1nXGsoouCoTxj7kdzC4MY8JZg==",
"license": "MIT",
"dependencies": {
-
"@atproto/common-web": "^0.3.0",
-
"@atproto/lexicon": "^0.4.1",
+
"@atproto/common-web": "^0.3.1",
+
"@atproto/lexicon": "^0.4.2",
"@atproto/syntax": "^0.3.0",
-
"@atproto/xrpc": "^0.6.2",
+
"@atproto/xrpc": "^0.6.3",
"await-lock": "^2.2.2",
"multiformats": "^9.9.0",
"tlds": "^1.234.0",
···
}
},
"node_modules/@atproto/common": {
-
"version": "0.4.2",
-
"resolved": "https://registry.npmjs.org/@atproto/common/-/common-0.4.2.tgz",
-
"integrity": "sha512-tv9lHjaoXW7CQrXUiu81RJZJ/bgcPSMaXrrgN4DxS08Z97hor0jgxThlwmGny1p6ksTZ5/bCX9GeJqi/b4LDCg==",
+
"version": "0.4.3",
+
"resolved": "https://registry.npmjs.org/@atproto/common/-/common-0.4.3.tgz",
+
"integrity": "sha512-CTgH3CEsWKwoj/bTsGpQaKS14qaelWGR8kInFfZNLbyNm1rCTFHzQqH5NJBxSL+dq2FHeelcDgrov9HCEuoaQw==",
"license": "MIT",
"dependencies": {
-
"@atproto/common-web": "^0.3.0",
+
"@atproto/common-web": "^0.3.1",
"@ipld/dag-cbor": "^7.0.3",
"cbor-x": "^1.5.1",
"iso-datestring-validator": "^2.2.2",
···
}
},
"node_modules/@atproto/common-web": {
-
"version": "0.3.0",
-
"resolved": "https://registry.npmjs.org/@atproto/common-web/-/common-web-0.3.0.tgz",
-
"integrity": "sha512-67VnV6JJyX+ZWyjV7xFQMypAgDmjVaR9ZCuU/QW+mqlqI7fex2uL4Fv+7/jHadgzhuJHVd6OHOvNn0wR5WZYtA==",
+
"version": "0.3.1",
+
"resolved": "https://registry.npmjs.org/@atproto/common-web/-/common-web-0.3.1.tgz",
+
"integrity": "sha512-N7wiTnus5vAr+lT//0y8m/FaHHLJ9LpGuEwkwDAeV3LCiPif4m/FS8x/QOYrx1PdZQwKso95RAPzCGWQBH5j6Q==",
"license": "MIT",
"dependencies": {
"graphemer": "^1.4.0",
"multiformats": "^9.9.0",
"uint8arrays": "3.0.0",
-
"zod": "^3.21.4"
+
"zod": "^3.23.8"
}
},
"node_modules/@atproto/common-web/node_modules/uint8arrays": {
···
}
},
"node_modules/@atproto/identity": {
-
"version": "0.4.1",
-
"resolved": "https://registry.npmjs.org/@atproto/identity/-/identity-0.4.1.tgz",
-
"integrity": "sha512-5AoPJDSD0rAay/6Sib+n/FjfwGulM/+xCNxwwDLR9QI4EoeUlvIH8g5BNdix812v312/Qd42kJrLpCNTZ5rvew==",
+
"version": "0.4.2",
+
"resolved": "https://registry.npmjs.org/@atproto/identity/-/identity-0.4.2.tgz",
+
"integrity": "sha512-Z267XI84enuYQLV8hgDMVkGZqy8GtPI4PYVn1rz4YKwSaI+nGwADNtyK+ZZWFa0tTDKS6q6u4ae7B8RdrUlk8A==",
"license": "MIT",
"dependencies": {
-
"@atproto/common-web": "^0.3.0",
+
"@atproto/common-web": "^0.3.1",
"@atproto/crypto": "^0.4.1",
"axios": "^0.27.2"
}
},
"node_modules/@atproto/lexicon": {
-
"version": "0.4.1",
-
"resolved": "https://registry.npmjs.org/@atproto/lexicon/-/lexicon-0.4.1.tgz",
-
"integrity": "sha512-bzyr+/VHXLQWbumViX5L7h1NKQObfs8Z+XZJl43OUK8nYFUI4e/sW1IZKRNfw7Wvi5YVNK+J+yP3DWIBZhkCYA==",
+
"version": "0.4.2",
+
"resolved": "https://registry.npmjs.org/@atproto/lexicon/-/lexicon-0.4.2.tgz",
+
"integrity": "sha512-CXoOkhcdF3XVUnR2oNgCs2ljWfo/8zUjxL5RIhJW/UNLp/FSl+KpF8Jm5fbk8Y/XXVPGRAsv9OYfxyU/14N/pw==",
"license": "MIT",
"dependencies": {
-
"@atproto/common-web": "^0.3.0",
+
"@atproto/common-web": "^0.3.1",
"@atproto/syntax": "^0.3.0",
"iso-datestring-validator": "^2.2.2",
"multiformats": "^9.9.0",
···
"license": "MIT"
},
"node_modules/@atproto/xrpc": {
-
"version": "0.6.2",
-
"resolved": "https://registry.npmjs.org/@atproto/xrpc/-/xrpc-0.6.2.tgz",
-
"integrity": "sha512-as/gb08xJb02HAGNrSQSumCe10WnOAcnM6bR6KMatQyQJuEu7OY6ZDSTM/4HfjjoxsNqdvPmbYuoUab1bKTNlA==",
+
"version": "0.6.3",
+
"resolved": "https://registry.npmjs.org/@atproto/xrpc/-/xrpc-0.6.3.tgz",
+
"integrity": "sha512-S3tRvOdA9amPkKLll3rc4vphlDitLrkN5TwWh5Tu/jzk7mnobVVE3akYgICV9XCNHKjWM+IAPxFFI2qi+VW6nQ==",
"license": "MIT",
"dependencies": {
-
"@atproto/lexicon": "^0.4.1",
+
"@atproto/lexicon": "^0.4.2",
"zod": "^3.23.8"
}
},
···
}
},
"node_modules/@types/node": {
-
"version": "22.5.5",
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.5.tgz",
-
"integrity": "sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA==",
+
"version": "22.7.4",
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.4.tgz",
+
"integrity": "sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==",
"dev": true,
"license": "MIT",
"dependencies": {
···
}
},
"node_modules/ajv/node_modules/fast-uri": {
-
"version": "3.0.1",
-
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz",
-
"integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==",
+
"version": "3.0.2",
+
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.2.tgz",
+
"integrity": "sha512-GR6f0hD7XXyNJa25Tb9BuIdN0tdr+0BMi6/CJPH3wJO1JjNG3n/VsSw38AwRdKZABm8lGbPfakLRkYzx2V9row==",
"license": "MIT"
},
"node_modules/array-flatten": {
···
},
"node_modules/tlds": {
-
"version": "1.254.0",
-
"resolved": "https://registry.npmjs.org/tlds/-/tlds-1.254.0.tgz",
-
"integrity": "sha512-YY4ei7K7gPGifqNSrfMaPdqTqiHcwYKUJ7zhLqQOK2ildlGgti5TSwJiXXN1YqG17I2GYZh5cZqv2r5fwBUM+w==",
+
"version": "1.255.0",
+
"resolved": "https://registry.npmjs.org/tlds/-/tlds-1.255.0.tgz",
+
"integrity": "sha512-tcwMRIioTcF/FcxLev8MJWxCp+GUALRhFEqbDoZrnowmKSGqPrl5pqS+Sut2m8BgJ6S4FExCSSpGffZ0Tks6Aw==",
"license": "MIT",
"bin": {
"tlds": "bin.js"
+3 -3
src/label.ts
···
else console.log(`Labeler server listening on ${address}`);
});
-
export const label = async (did: string, rkey: string) => {
+
export const label = (did: string, rkey: string) => {
const query = server.db
.prepare<
unknown[],
···
const time = new Date().toISOString();
if (rkey.includes(DELETE)) {
-
await server
+
server
.createLabels({ uri: did }, { negate: [...labels] })
.catch((err) => console.log(err))
.then(() => console.log(`${time}: Deleted labels for ${did}`));
} else if (labels.size < LABEL_LIMIT && POSTS[rkey]) {
-
await server
+
server
.createLabel({ uri: did, val: POSTS[rkey] })
.catch((err) => console.log(err))
.then(() => console.log(`${time}: Labeled ${did} with ${POSTS[rkey]}`));