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

Draft: v2 core #139

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open

Draft: v2 core #139

wants to merge 38 commits into from

Conversation

mrWh1te
Copy link
Owner

@mrWh1te mrWh1te commented Sep 16, 2021

Description

See #87

Screenshots

While technically not a screenshot, check out the music-alarm app for a demo app using the new architecture. Currently, it uses a cron job schedule to open the browser to an artist soundcloud, plays their music for a while then closes until the next scheduled alarm.

Related

  • TBD: Link relevant issues, pr's, etc.

Checklist

  • browser()() auto-close browser after actions
  • replace try/catch with errors()() in apps
  • replicate tests for v2core
  • migrate v2core into core
  • decide on renaming packages depending on puppeteer ie puppeteer-reddit vs packages that build bots but without puppeteer
  • verify
  • upgrade core and other packages to v2.0

Documentation

  • todo

Publishing

  • todo

Blog

  • todo topic of Botmation architecture v2: why slight complexity added to injects system (and how thats great) & benefits of decoupling Puppeteer (BotAction -> Action)

mrWh1te added 30 commits July 7, 2021 14:24
- needs types and interfaces
- separate lib to develop v2 of core
- piece meal dx
- puppeteer-bot scafolding app
- helpers, interfaces, types copied from v1
- unit test new inject() Action
- uses browser(), browserPage() to inject 'browser' then 'page'
- uses inline Action to utilize `page` inject (tbd rn params) to go to
website working
- Actions for puppeteer
   - input, local storage, navigation, scrape
- Actions for corev2
   - errors, loops
- default will use initial page if exists otherwise create a new one,
just like the original behavior used in bot examples
- tweaked errors action typing
- Injects interface
- Twitter Auth Action
- auth, start of navigation, start of music player actions
- bot that opens (then closes when done) a browser & page
  on schedule M-F 630am to play music from Idealism on Soundcloud
- 2 problems
  - sometimes an Action that requires an Inject that hasnt been injected
  yet doesnt throw a static type error
  - when it does throw an error, the error message isnt very helpful,
  the first part lights the way, the message itself sometimes doesnt
  help
@codecov
Copy link

codecov bot commented Sep 16, 2021

Codecov Report

Merging #139 (c7fde2f) into master (dcbb89d) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #139   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           39        39           
  Lines          671       671           
  Branches       164       164           
=========================================
  Hits           671       671           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dcbb89d...c7fde2f. Read the comment docs.

@sonarcloud
Copy link

sonarcloud bot commented Sep 16, 2021

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 92 Code Smells

No Coverage information No Coverage information
9.6% 9.6% Duplication

@mrWh1te mrWh1te added architecture botaction documentation Improvements or additions to documentation npm Packaging, Releases, Dist related labels Sep 16, 2021
@mrWh1te mrWh1te linked an issue Sep 16, 2021 that may be closed by this pull request
@mrWh1te mrWh1te changed the title Draft: V2 core Draft: v2 core Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture botaction documentation Improvements or additions to documentation npm Packaging, Releases, Dist related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

browser()
1 participant