Skip to content

Commit 60d5480

Browse files
committed
failed publish
1 parent 0372aaf commit 60d5480

3 files changed

Lines changed: 21 additions & 12 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "notion-contentlayer",
3-
"version": "0.0.2",
3+
"version": "0.0.1",
44
"description": "Type-safe Notion content layer for easily rendering Notion content. Works with the Remark & Rehype ecosystem.",
55
"repository": "useflytrap/notion-contentlayer",
66
"exports": {

src/errors.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const notionError = createHumanLogs(
3232
"unsupported_phrasing_content",
3333
"the MDAST `PhrasingContent` node type `{nodeType}` is not yet supported",
3434
{
35-
params: { nodeType: '' },
35+
params: { nodeType: "" },
3636
}
3737
),
3838
explanation(
@@ -74,11 +74,13 @@ export const notionError = createHumanLogs(
7474
"request_phrasing_content_support",
7575
"request support for node type `{nodeType}`",
7676
{
77-
params: { nodeType: '' },
78-
actions: [{
79-
text: "Open an issue",
80-
href: "https://github.com/useflytrap/notion-contentlayer/issues/new",
81-
}]
77+
params: { nodeType: "" },
78+
actions: [
79+
{
80+
text: "Open an issue",
81+
href: "https://github.com/useflytrap/notion-contentlayer/issues/new",
82+
},
83+
],
8284
}
8385
),
8486
solution(

src/types.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,16 @@ export type UnwrappedSchemaTransform<T extends ZodSchema> = ReturnType<
4242
z.infer<T>["unwrap"]
4343
>
4444

45-
type TransformedPost<T extends Record<string, NotionProperty<ZodSchema>>> = SchemaOutputs<T> & { blocks: Root }
45+
type TransformedPost<T extends Record<string, NotionProperty<ZodSchema>>> =
46+
SchemaOutputs<T> & { blocks: Root }
4647

47-
export type NotionSource<T extends Record<string, NotionProperty<ZodSchema>>> = {
48-
fetchPosts: (options: FetchPostsOptions) => Promise<Result<Array<SchemaOutputs<T> | TransformedPost<T>>, unknown>>,
49-
getPostContents: (postId: string, options: Partial<Pick<FetchPostsOptions, "allowMissingBlocktypes">>) => Promise<Result<Root, unknown>>
50-
}
48+
export type NotionSource<T extends Record<string, NotionProperty<ZodSchema>>> =
49+
{
50+
fetchPosts: (
51+
options: FetchPostsOptions
52+
) => Promise<Result<Array<SchemaOutputs<T> | TransformedPost<T>>, unknown>>
53+
getPostContents: (
54+
postId: string,
55+
options: Partial<Pick<FetchPostsOptions, "allowMissingBlocktypes">>
56+
) => Promise<Result<Root, unknown>>
57+
}

0 commit comments

Comments
 (0)