Skip to content

Commit a5a6cb6

Browse files
authored
Removes typings and fixes sync deploy (#8)
* wip * update telegram to escape characters * update transform to transformer type * fix plugin type map * near-rewards * Adds near social plugin (#6) * init plugin * fixed frontend * working plugin * fix test * fmt * fmt * fix tests * wip * simpler plugin * wip * clean-up * move rss-service * example * updates and adds docker support * upgrade object-transform * fmt * bun lock * clean up rss according to comments * nit picks * nit pick * add template syncing * update readme * use actions/checkout@v4 * fix build
1 parent df99cb8 commit a5a6cb6

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

.github/workflows/sync-rss-service.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
uses: ./.github/workflows/sync-service-template.yml
1212
with:
1313
source_path: packages/rss/service
14-
target_repo: curatedotfun/rss-service-template
14+
target_repo: potlock/rss-service-template
1515
target_branch: main
1616
secrets:
1717
deploy_token: ${{ secrets.RSS_DEPLOY_TOKEN }}

packages/rss/service/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FeedOptions, Item } from "feed/lib/typings/index.js";
1+
import { FeedOptions, Item } from "feed";
22

33
// Format types supported by the service
44
export type FeedFormat = "rss" | "atom" | "json" | "raw";

packages/rss/src/index.ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { ActionArgs, DistributorPlugin } from "@curatedotfun/types";
2-
import { Category, Enclosure } from "feed/lib/typings/index.js";
32
import { z } from "zod";
43
import { RssItem } from "../service/src/types";
54
import { RssConfig } from "./types";
@@ -169,14 +168,17 @@ export default class RssPlugin
169168
...(validatedInput.categories && {
170169
category: Array.isArray(validatedInput.categories)
171170
? typeof validatedInput.categories[0] === "string"
172-
? validatedInput.categories.map(
173-
(cat) => ({ name: cat as string }) as Category,
174-
)
175-
: (validatedInput.categories as Category[])
171+
? validatedInput.categories.map((cat) => ({
172+
name: cat as string,
173+
}))
174+
: (validatedInput.categories as {
175+
name: string;
176+
domain?: string;
177+
}[])
176178
: [
177179
{
178180
name: validatedInput.categories as unknown as string,
179-
} as Category,
181+
},
180182
],
181183
}),
182184

@@ -185,26 +187,26 @@ export default class RssPlugin
185187
image:
186188
typeof validatedInput.image === "string"
187189
? validatedInput.image
188-
: (validatedInput.image as Enclosure),
190+
: validatedInput.image,
189191
}),
190192

191193
...(validatedInput.audio && {
192194
audio:
193195
typeof validatedInput.audio === "string"
194196
? validatedInput.audio
195-
: (validatedInput.audio as Enclosure),
197+
: validatedInput.audio,
196198
}),
197199

198200
...(validatedInput.video && {
199201
video:
200202
typeof validatedInput.video === "string"
201203
? validatedInput.video
202-
: (validatedInput.video as Enclosure),
204+
: validatedInput.video,
203205
}),
204206

205207
// Additional metadata
206208
...(validatedInput.enclosure && {
207-
enclosure: validatedInput.enclosure as Enclosure,
209+
enclosure: validatedInput.enclosure,
208210
}),
209211
...(validatedInput.source && { source: validatedInput.source }),
210212
...(validatedInput.isPermaLink !== undefined && {

0 commit comments

Comments
 (0)