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

Brick schema typed poc #9005

Closed
wants to merge 1 commit into from
Closed

Conversation

fungairino
Copy link
Collaborator

@fungairino fungairino commented Aug 12, 2024

What does this PR do?

  • A POC showing off how we could use the json-schema-to-ts lib to generate typings for the brick transform and run functions

https://www.npmjs.com/package/json-schema-to-ts

@fungairino fungairino changed the base branch from main to screenshot-bug August 12, 2024 20:59
Comment on lines +35 to +36
typeof this.outputSchema extends JSONSchema
? FromSchema<typeof this.outputSchema>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a bit of the tricky part since we don't want to try to infer the "FromSchema" type until the brick overrides this type with the actual schema value

Copy link

codecov bot commented Aug 12, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Please upload report for BASE (screenshot-bug@285cb01). Learn more about missing BASE report.

Files Patch % Lines
src/bricks/transformers/screenshotTab.ts 66.66% 1 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##             screenshot-bug    #9005   +/-   ##
=================================================
  Coverage                  ?   74.37%           
=================================================
  Files                     ?     1353           
  Lines                     ?    41898           
  Branches                  ?     7828           
=================================================
  Hits                      ?    31162           
  Misses                    ?    10736           
  Partials                  ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Playwright test results

failed  1 failed
passed  121 passed
flaky  2 flaky
skipped  6 skipped

Details

report  Open report ↗︎
stats  130 tests across 44 suites
duration  11 minutes, 42 seconds
commit  7198bb7
info  For more information on how to debug and view this report, see our readme

Failed tests

edge › tests/runtime/screenshotTab.spec.ts › screenshot tab brick functionality

Flaky tests

chrome › tests/pageEditor/addStarterBrick.spec.ts › Add starter brick to mod
edge › tests/pageEditor/addStarterBrick.spec.ts › Add starter brick to mod

Skipped tests

chrome › tests/regressions/doNotCloseSidebarOnPageEditorSave.spec.ts › #8104: Do not automatically close the sidebar when saving in the Page Editor
edge › tests/regressions/doNotCloseSidebarOnPageEditorSave.spec.ts › #8104: Do not automatically close the sidebar when saving in the Page Editor
chrome › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options
edge › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options
chrome › tests/runtime/insertAtCursor.spec.ts › Insert at Cursor › 8154: can insert at cursor after opening sidebar from selection menu
edge › tests/runtime/insertAtCursor.spec.ts › Insert at Cursor › 8154: can insert at cursor after opening sidebar from selection menu

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

Successfully merging this pull request may close these issues.

2 participants