Skip to content

Commit

Permalink
major: Update to 2.0.0-beta.19
Browse files Browse the repository at this point in the history
  • Loading branch information
juni-b-queer committed Dec 4, 2024
1 parent a3d209a commit b0d4b3a
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 18 deletions.
4 changes: 3 additions & 1 deletion templates/default/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ TEST_BSKY_PASSWORD=
DEBUG_LOG_ACTIVE=true
DEBUG_LOG_LEVEL=info

JETSTREAM_URL='ws://jetstream:6008/subscribe'
JETSTREAM_URL='ws://jetstream:6008/subscribe'

SESSION_DATA_PATH='/sessionData'
2 changes: 1 addition & 1 deletion templates/default/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM oven/bun:1.0.15 as base
FROM oven/bun:latest as base
WORKDIR /usr/src/app

# install dependencies into temp directory
Expand Down
3 changes: 3 additions & 0 deletions templates/default/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ services:
- jetstream
build: .
restart: unless-stopped
volumes:
- ./sessionData:/sessionData
env_file:
- .env
networks:
Expand All @@ -14,6 +16,7 @@ services:
jetstream:
image: "junibqueer/jetstream:main"
container_name: jetstream
restart: unless-stopped
environment:
- CURSOR_FILE=/data/cursor.json
ports:
Expand Down
2 changes: 1 addition & 1 deletion templates/default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"typescript": "^5.0.0"
},
"dependencies": {
"bsky-event-handlers": "^2.0.0-beta.9",
"bsky-event-handlers": "^2.0.0-beta.19",
"@atproto/api": "^0.12.23"
},
"license": "{{license}}"
Expand Down
8 changes: 4 additions & 4 deletions templates/default/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
JetstreamSubscription,
LogMessageAction,
ReplyingToBotValidator,
ReplyToSkeetAction,
MessageHandler,
IntervalSubscription,
IntervalSubscriptionHandlers,
AbstractHandler,
Expand All @@ -30,9 +30,9 @@ let jetstreamSubscription: JetstreamSubscription;
let handlers = {
post: {
c: [
new CreateSkeetHandler(
[new ReplyingToBotValidator(), new InputEqualsValidator("Hello")],
[new LogMessageAction(), new ReplyToSkeetAction("World!")],
new MessageHandler(
[ReplyingToBotValidator().make(), InputEqualsValidator("Hello").make()],
[LogMessageAction().make(), CreateSkeetAction.make('World!', MessageHandler.generateReplyFromMessage)],
testAgent
),
new GoodBotHandler(testAgent),
Expand Down
4 changes: 1 addition & 3 deletions templates/interval/.env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
TEST_BSKY_HANDLE=
TEST_BSKY_PASSWORD=
DEBUG_LOG_ACTIVE=true
DEBUG_LOG_LEVEL=info

JETSTREAM_URL='ws://jetstream:6008/subscribe'
DEBUG_LOG_LEVEL=info
2 changes: 1 addition & 1 deletion templates/interval/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM oven/bun:1.0.15 as base
FROM oven/bun:latest as base
WORKDIR /usr/src/app

# install dependencies into temp directory
Expand Down
2 changes: 1 addition & 1 deletion templates/interval/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"typescript": "^5.0.0"
},
"dependencies": {
"bsky-event-handlers": "^2.0.0-beta.9",
"bsky-event-handlers": "^2.0.0-beta.19",
"@atproto/api": "^0.12.23"
},
"license": "{{license}}"
Expand Down
8 changes: 8 additions & 0 deletions templates/jetstream/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
TEST_BSKY_HANDLE=
TEST_BSKY_PASSWORD=
DEBUG_LOG_ACTIVE=true
DEBUG_LOG_LEVEL=info

JETSTREAM_URL='ws://jetstream:6008/subscribe'

SESSION_DATA_PATH='/sessionData'
3 changes: 3 additions & 0 deletions templates/jetstream/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ services:
- jetstream
build: .
restart: unless-stopped
volumes:
- ./sessionData:/sessionData
env_file:
- .env
networks:
Expand All @@ -14,6 +16,7 @@ services:
jetstream:
image: "junibqueer/jetstream:main"
container_name: jetstream
restart: unless-stopped
environment:
- CURSOR_FILE=/data/cursor.json
ports:
Expand Down
2 changes: 1 addition & 1 deletion templates/jetstream/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"typescript": "^5.0.0"
},
"dependencies": {
"bsky-event-handlers": "^2.0.0-beta.9",
"bsky-event-handlers": "^2.0.0-beta.19",
"@atproto/api": "^0.12.23"
},
"license": "{{license}}"
Expand Down
10 changes: 5 additions & 5 deletions templates/jetstream/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import {
BadBotHandler,
CreateSkeetHandler,
CreateSkeetAction,
DebugLog,
GoodBotHandler,
HandlerAgent,
InputEqualsValidator,
JetstreamSubscription,
LogMessageAction,
ReplyingToBotValidator,
ReplyToSkeetAction
MessageHandler
} from 'bsky-event-handlers';

const testAgent = new HandlerAgent(
Expand All @@ -25,9 +25,9 @@ let jetstreamSubscription: JetstreamSubscription;
let handlers = {
post: {
c: [
new CreateSkeetHandler(
[new ReplyingToBotValidator(), new InputEqualsValidator("Hello")],
[new LogMessageAction(), new ReplyToSkeetAction("World!")],
new MessageHandler(
[ReplyingToBotValidator().make(), InputEqualsValidator("Hello").make()],
[LogMessageAction().make(), CreateSkeetAction.make('World!', MessageHandler.generateReplyFromMessage)],
testAgent
),
new GoodBotHandler(testAgent),
Expand Down

0 comments on commit b0d4b3a

Please sign in to comment.