Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add client #32

Merged
merged 30 commits into from
Jan 14, 2025
Merged

feat: add client #32

merged 30 commits into from
Jan 14, 2025

Conversation

anbraten
Copy link
Contributor

@anbraten anbraten commented Dec 5, 2024

This is my approach to add some initial functions to the client.
For now it supports tsky.bsky.profile(), tsky.bsky.feed.getFeed() and tsky.bsky.feed.getTimeline().

In comparison to #22 it uses @atcute/client underneath to avoid implementing the session and error handling again.

Copy link

netlify bot commented Dec 5, 2024

Deploy Preview for tsky canceled.

Name Link
🔨 Latest commit 8dae875
🔍 Latest deploy log https://app.netlify.com/sites/tsky/deploys/678104a8437ceb0008243084

@anbraten anbraten marked this pull request as ready for review December 7, 2024 17:57
Copy link
Contributor

@skiniks skiniks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment on lines 32 to 34
env:
ALICE_APP_PASSWORD: ${{ secrets.ALICE_PASSWORD }}
BOB_APP_PASSWORD: ${{ secrets.BOB_PASSWORD }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I tried this branch in my fork repository: https://github.com/shuuji3/tsky/actions/runs/12554818190/job/35004050251?pr=1

I got a different error, but at least the current CI error (Secret is required) can be fixed by setting the correct passwords in the repository setting. Could you double-check the repository setting and if there is correct secrets are set?

The secret names differ from the environment names, so I was a bit confused. To be consistent, maybe we can use the same name, ALICE_APP_PASSWORD (not ALICE_PASSWORD), for both the environment and GitHub secrets.

Copy link
Collaborator

@shuuji3 shuuji3 Jan 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, we were able to solve the password issue. It seems that the secret value in GitHub Actions did not expand as we expected.

This CI log has the same error as the above link: https://github.com/tsky-dev/tsky/actions/runs/12635493640/job/35205727273?pr=32

I don't have any idea about why the private number access error occurs yet. Maybe we need to configure the test environment to use newer ECMAScript, or adjust the package importing of acute, or it can be TypeScript configuration issue? 🤔 (looks like those are not cases)

@shuuji3
Copy link
Collaborator

shuuji3 commented Jan 8, 2025

I somehow find a way to solve the current issue in #35. I tried changing to initialize XPRC instance outside and pass it to Client, instead of passing handler.

I'm still unsure why the initial approach caused the issue, and if this approach is fine.

Could you review my new commits? Feel free to cherry-pick here if you'd like.


Side note during debugging:

.github/workflows/ci.yml Outdated Show resolved Hide resolved
@patak-dev
Copy link
Contributor

Let's merge this one to unlock others to keep working on main directly, we can keep iterating there

@patak-dev patak-dev merged commit 4c4bf31 into tsky-dev:main Jan 14, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants