this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Lint

futur d773c89e 75e93c65

+11 -10
+1
.eslintrc.json
··· 14 14 "@typescript-eslint/no-unsafe-assignment": "off", 15 15 "@typescript-eslint/no-unsafe-call": "off", 16 16 "@typescript-eslint/no-unsafe-member-access": "off", 17 + "@typescript-eslint/no-unsafe-return": "off", 17 18 "@typescript-eslint/restrict-plus-operands": "off", 18 19 "@typescript-eslint/restrict-template-expressions": "off", 19 20 "@typescript-eslint/unified-signatures": "off"
+3 -1
src/LabelerServer.ts
··· 199 199 private async emitLabel(label: ComAtprotoLabelDefs.Label) { 200 200 const signed = await this.ensureSignedLabel(label); 201 201 const frame = new MessageFrame({ seq: label.id, labels: [signed] }, { type: "#labels" }); 202 - this.connections.get("com.atproto.label.subscribeLabels")?.forEach((ws) => { ws.send(frame.toBytes()); }); 202 + this.connections.get("com.atproto.label.subscribeLabels")?.forEach((ws) => { 203 + ws.send(frame.toBytes()); 204 + }); 203 205 } 204 206 205 207 /**
+2 -2
src/index.ts
··· 1 - export { LabelerServer, type LabelerOptions } from "./LabelerServer.js"; 1 + export { type LabelerOptions, LabelerServer } from "./LabelerServer.js"; 2 + export { formatLabel, labelIsSigned, signLabel } from "./util/labels.js"; 2 3 export type { SignedLabel } from "./util/types.js"; 3 - export { formatLabel, signLabel, labelIsSigned } from "./util/labels.js";
+3 -5
src/scripts/declareLabeler.ts
··· 1 - import { AtpAgent, ComAtprotoLabelDefs } from "@atproto/api"; 1 + import type { AtpAgent, ComAtprotoLabelDefs } from "@atproto/api"; 2 2 import { loginAgentOrCredentials } from "./util.js"; 3 3 4 4 /** ··· 83 83 * Delete the labeler declaration for this account, removing all label definitions. 84 84 * @param agent The agent logged into the labeler account. 85 85 */ 86 - export async function deleteLabelerDeclaration( 87 - agent: AtpAgent, 88 - ): Promise<void>; 86 + export async function deleteLabelerDeclaration(agent: AtpAgent): Promise<void>; 89 87 export async function deleteLabelerDeclaration( 90 88 agentOrCredentials: AtpAgent | { pds?: string; identifier: string; password: string }, 91 89 ) { 92 90 const agent = await loginAgentOrCredentials(agentOrCredentials); 93 91 await agent.app.bsky.labeler.service.delete({ repo: agent.accountDid }); 94 - } 92 + }
+1 -1
src/scripts/plc.ts
··· 154 154 } 155 155 await agent.login({ identifier: options.did, password: options.password }); 156 156 } 157 - 157 + 158 158 const credentials = await agent.com.atproto.identity.getRecommendedDidCredentials(); 159 159 if (!credentials.success) { 160 160 throw new Error("Failed to fetch DID document.");
+1 -1
src/util/types.ts
··· 4 4 & { [K in keyof T as undefined extends T[K] ? never : K]: T[K] } 5 5 & { [K in keyof T as undefined extends T[K] ? K : never]?: T[K] }; 6 6 7 - export type SignedLabel = ComAtprotoLabelDefs.Label & { sig: Uint8Array }; 7 + export type SignedLabel = ComAtprotoLabelDefs.Label & { sig: Uint8Array };