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

Provide working CLI for existing Twitter actions #29

Merged

Conversation

antaranyan
Copy link
Contributor

Addresses #20

@antaranyan antaranyan linked an issue Oct 3, 2022 that may be closed by this pull request
@antaranyan
Copy link
Contributor Author

antaranyan commented Oct 4, 2022

For parsing CLI arguments it could've been helpful to use util.parseArg from Node.js 18.

As using Node.js 16, some external options are available:

@antaranyan antaranyan force-pushed the 20-create-command-line-interface-for-twitter-actions branch from 1e6c01d to 3be78a4 Compare October 4, 2022 01:44
@antaranyan
Copy link
Contributor Author

CI build fails because of formatting as I contributed from a Windows machine, seems like #26 didn't work after all.

@antaranyan antaranyan force-pushed the 20-create-command-line-interface-for-twitter-actions branch from d78fcee to e707d23 Compare October 4, 2022 03:45
@@ -0,0 +1,28 @@
#!/usr/bin/env node

import meow from "meow";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ESM imports look nice.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Depends on #31

@antaranyan antaranyan force-pushed the 20-create-command-line-interface-for-twitter-actions branch from 4e68a09 to 051322e Compare October 4, 2022 03:58
@antaranyan antaranyan force-pushed the 20-create-command-line-interface-for-twitter-actions branch from 051322e to fa2d41f Compare October 4, 2022 04:01
@antaranyan antaranyan force-pushed the 20-create-command-line-interface-for-twitter-actions branch from 76b78c0 to 9138adf Compare October 4, 2022 07:00
@antaranyan
Copy link
Contributor Author

CLI implementation weighs more than it does, lacks tests, and the design feels not scalable. Though it's likely to be replaced completely when it's clear where the software goes.

For now, it's fine to merge as long as it somehow works.

@antaranyan antaranyan merged commit 9bcc59b into main Oct 4, 2022
@antaranyan antaranyan deleted the 20-create-command-line-interface-for-twitter-actions branch October 4, 2022 07:12
Comment on lines +9 to +10
const page = await context.browserContext.newPage();
const profileView = new UserProfileViewAdapter(page);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Feels like BrowserContext would be better injectable here, so the view itself can instantiate the page, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create command line interface for Twitter actions
1 participant