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: Config deserialization #193

Merged
merged 8 commits into from
Oct 16, 2023
Merged

Conversation

ianshade
Copy link
Member

@ianshade ianshade commented Oct 5, 2023

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    Adds deserialization to the response of INFO CONFIG

  • What is the current behavior? (You can also link to an open issue here)
    Config is returned as unknown, unparsed.

  • What is the new behavior (if this is a feature change)?
    Config is parsed from XML to follow the InfoConfig interface, which is based on the config elements available in CasparCG 2.4. Any untyped, different or non-standard elements can be accessed through raw or rawXml properties.

  • Other information:
    I'm opening this PR towards a feature branch that has already an open PR, so that my changes are easier to review on their own.

@codecov-commenter
Copy link

codecov-commenter commented Oct 5, 2023

Codecov Report

Attention: 30 lines in your changes are missing coverage. Please review.

Comparison is base (61b581b) 81.62% compared to head (f41399c) 81.32%.

Additional details and impacted files
@@                 Coverage Diff                  @@
##           feat/return-data     #193      +/-   ##
====================================================
- Coverage             81.62%   81.32%   -0.30%     
====================================================
  Files                     7       14       +7     
  Lines                   604      723     +119     
  Branches                110      164      +54     
====================================================
+ Hits                    493      588      +95     
- Misses                  108      131      +23     
- Partials                  3        4       +1     
Files Coverage Δ
src/commands.ts 100.00% <ø> (ø)
src/deserializers/deserializeInfoChannel.ts 100.00% <100.00%> (ø)
src/deserializers/deserializeXML.ts 100.00% <100.00%> (ø)
src/lib.ts 100.00% <100.00%> (ø)
src/deserializers/deserializeClipInfo.ts 93.75% <93.75%> (ø)
src/deserializers/deserializeInfo.ts 85.71% <85.71%> (ø)
src/deserializers/deserializeInfoLayer.ts 66.66% <66.66%> (ø)
src/deserializers/index.ts 94.44% <94.44%> (ø)
src/deserializers/deserializeVersion.ts 88.23% <88.23%> (ø)
src/deserializers/deserializeInfoConfig.ts 73.91% <73.91%> (ø)

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

src/deserializers.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@mint-dewit mint-dewit left a comment

Choose a reason for hiding this comment

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

I am personally not a fan of redefining the entire config structure in this library, it feels like that is doing too much.

Still approving because casparcg is developed slowly enough and there is a (albeit clunky) way of accessing untyped config.

@nytamin nytamin merged commit ceaed83 into feat/return-data Oct 16, 2023
14 checks passed
@nytamin nytamin deleted the feat/return-data-more branch October 16, 2023 09:47
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.

4 participants