Skip to content

Commit f7b237d

Browse files
Fix prettier
1 parent 54edfb5 commit f7b237d

6 files changed

Lines changed: 12 additions & 19 deletions

File tree

astro-atproto-loader/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,6 @@ A working version of this lives at
363363
Use `filter` to drop records before they reach `groupBy`, or return a unique
364364
key like `uri` for records that shouldn't merge with anything else.
365365

366-
367366
## Default transforms
368367

369368
When the loader is configured with exactly one source and no `transform`, it

astro-atproto-loader/__examples__/03-grouped-reposts/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ reposted, with the original post hydrated for display.
2323
`app.bsky.feed.repost` collection
2424
- `parseRecord` runs once per record and drops anything that isn't a
2525
well-formed repost. Today this is hand-rolled Zod for `repost`, `post`,
26-
and `profile`.
26+
and `profile`.
2727
- `groupBy` returns the URI of the post being reposted, so reposts of the
2828
same post end up in the same group
2929
- The `transform` keeps only groups of size 3, then uses `fetchRecord` to:

astro-atproto-loader/__examples__/03-grouped-reposts/src/live.config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ const PostSchema = z.object({
5151
embed: z.unknown().optional(),
5252
});
5353

54-
5554
// Pull the first image off a post, if it has one. Bluesky posts can
5655
// carry up to four; we keep this small.
5756
function getFirstPostImage(embed: unknown) {
@@ -235,4 +234,3 @@ const sharedReposts = defineAtProtoLiveCollection({
235234
});
236235

237236
export const collections = { sharedReposts };
238-

astro-atproto-loader/src/loaders/static.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ type AtProtoStaticTransformOptions<
3232
> =
3333
| {
3434
groupBy?: never;
35-
transform?: AtProtoRecordTransform<
36-
Sources,
37-
AtProtoStaticDataEntry<Data>
38-
>;
35+
transform?: AtProtoRecordTransform<Sources, AtProtoStaticDataEntry<Data>>;
3936
}
4037
| {
4138
groupBy: AtProtoRecordGroupBy<Sources>;

astro-atproto-loader/src/pipeline/fetch-record.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ import { getErrorMessage } from "../utils.ts";
1717
export const createFetchRecord = (): FetchRecord => {
1818
const cache = new Map<string, Promise<RecordValue | null>>();
1919

20-
const fetchBase = async (
21-
atUri: string,
22-
): Promise<RecordValue | null> => {
20+
const fetchBase = async (atUri: string): Promise<RecordValue | null> => {
2321
let parsed: AtUri;
2422
try {
2523
parsed = new AtUri(atUri);

astro-atproto-loader/src/types.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,10 @@ export interface AtProtoRecordContext {
8787
* Each failure mode logs a distinct warning, so callers can tell which thing
8888
* went wrong from the console.
8989
*/
90-
export type FetchRecord = <Parsed = RecordValue>(
91-
args: {
92-
atUri: string;
93-
parse?: (value: unknown) => Parsed;
94-
},
95-
) => Promise<Parsed | null>;
90+
export type FetchRecord = <Parsed = RecordValue>(args: {
91+
atUri: string;
92+
parse?: (value: unknown) => Parsed;
93+
}) => Promise<Parsed | null>;
9694

9795
/**
9896
* The bundle of args passed to each `filter` and `transform` callback for a
@@ -216,7 +214,10 @@ export type AtProtoRecordCallbacks<
216214
export type OnSourceError =
217215
| "throw"
218216
| "skip"
219-
| ((error: unknown, source: AtProtoLoaderSource<unknown>) => "throw" | "skip");
217+
| ((
218+
error: unknown,
219+
source: AtProtoLoaderSource<unknown>,
220+
) => "throw" | "skip");
220221

221222
/**
222223
* Structural extraction of a Zod schema's input type. Avoids depending on a
@@ -228,4 +229,4 @@ export type SchemaInput<S> = S extends { readonly _input: infer Input }
228229
: never
229230
: never;
230231

231-
export type SchemaLike = { readonly _input: Record<string, unknown> };
232+
export type SchemaLike = { readonly _input: Record<string, unknown> };

0 commit comments

Comments
 (0)