Skip to content

Conversation

ancheetah
Copy link
Collaborator

@ancheetah ancheetah commented Jun 24, 2025

JIRA Ticket

https://pingidentity.atlassian.net/browse/SDKS-4146

Description

Implements Protect collector in DaVinci client. Will write e2e tests in another ticket because we do not have a working e2e flow yet. Manual testing only for now.

Changeset added.

Copy link

changeset-bot bot commented Jun 24, 2025

🦋 Changeset detected

Latest commit: 0fa522a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@forgerock/davinci-client Minor
@forgerock/oidc-client Minor
@forgerock/sdk-types Minor
@forgerock/sdk-utilities Minor
@forgerock/iframe-manager Minor
@forgerock/sdk-logger Minor
@forgerock/sdk-oidc Minor
@forgerock/sdk-request-middleware Minor
@forgerock/storage Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

nx-cloud bot commented Jun 24, 2025

View your CI Pipeline Execution ↗ for commit 0fa522a

Command Status Duration Result
nx run-many -t build ✅ Succeeded <1s View ↗
nx affected -t build typecheck lint test e2e-ci ✅ Succeeded 1m 34s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2025-07-08 14:41:41 UTC

@codecov-commenter
Copy link

codecov-commenter commented Jun 24, 2025

Codecov Report

Attention: Patch coverage is 26.15385% with 48 lines in your changes missing coverage. Please review.

Project coverage is 60.46%. Comparing base (d8be69f) to head (0fa522a).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
packages/davinci-client/src/lib/collector.utils.ts 19.23% 42 Missing ⚠️
packages/davinci-client/src/lib/client.store.ts 0.00% 4 Missing ⚠️
packages/davinci-client/src/lib/node.reducer.ts 71.42% 2 Missing ⚠️

❌ Your patch status has failed because the patch coverage (26.15%) is below the target coverage (40.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #340      +/-   ##
==========================================
- Coverage   61.61%   60.46%   -1.15%     
==========================================
  Files          33       33              
  Lines        1985     2044      +59     
  Branches      287      291       +4     
==========================================
+ Hits         1223     1236      +13     
- Misses        762      808      +46     
Files with missing lines Coverage Δ
packages/davinci-client/src/lib/collector.types.ts 100.00% <ø> (ø)
packages/davinci-client/src/lib/davinci.types.ts 100.00% <ø> (ø)
packages/davinci-client/src/lib/davinci.utils.ts 91.50% <100.00%> (-0.61%) ⬇️
packages/davinci-client/src/lib/node.types.ts 100.00% <ø> (ø)
packages/davinci-client/src/types.ts 50.00% <ø> (ø)
packages/davinci-client/src/lib/node.reducer.ts 77.85% <71.42%> (+0.07%) ⬆️
packages/davinci-client/src/lib/client.store.ts 0.37% <0.00%> (-0.01%) ⬇️
packages/davinci-client/src/lib/collector.utils.ts 76.55% <19.23%> (-8.42%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

github-actions bot commented Jun 24, 2025

Deployed 5c631e5 to https://ForgeRock.github.io/ping-javascript-sdk/pr-340/5c631e598c89cd69bc9845fabac5f4587b457bf3 branch gh-pages in ForgeRock/ping-javascript-sdk

export type ReadOnlyFields = ReadOnlyField;
export type RedirectFields = RedirectField;
export type SingleValueFields = StandardField | ValidatedField | SingleSelectField;
export type SingleValueFields = StandardField | ValidatedField | SingleSelectField | ProtectField;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need a ProtectField here? I think we're using the field directly in the AutoCollector, right?

could be missing something

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

A few lines above I define the ProtectField which I understood as an interface for the response we get from DaVinci. I wasn't sure if it should be categorized as a ComplexValueFields or SingleValueFIelds or even it's own category. But either way yeah I think it has to be defined here and included as a DaVinciField type in order for the node.next reducer to be able to return a Protect collector.

@ancheetah ancheetah force-pushed the SDKS-4146-protect-collector branch 2 times, most recently from 280e951 to 816ff82 Compare July 2, 2025 19:50
@ancheetah ancheetah force-pushed the SDKS-4146-protect-collector branch from 816ff82 to 0fa522a Compare July 8, 2025 14:38
Copy link
Contributor

github-actions bot commented Jul 8, 2025

📦 Bundle Size Analysis

📦 Bundle Size Analysis

📊 Minor Changes

📈 @forgerock/davinci-client - 34.3 KB (+0.6 KB)

➖ No Changes

@forgerock/sdk-types - 5.6 KB
@pingidentity/protect - 108.3 KB
@forgerock/device-client - 9.2 KB
@forgerock/storage - 1.3 KB
@forgerock/sdk-logger - 1.6 KB
@forgerock/sdk-oidc - 3.4 KB
@forgerock/iframe-manager - 2.5 KB
@forgerock/sdk-request-middleware - 4.2 KB
@forgerock/oidc-client - 1.2 KB
@forgerock/sdk-utilities - 4.0 KB


11 packages analyzed • Baseline from latest main build

Legend

🆕 New package
🔺 Size increased
🔻 Size decreased
➖ No change

ℹ️ How bundle sizes are calculated
  • Current Size: Total gzipped size of all files in the package's dist directory
  • Baseline: Comparison against the latest build from the main branch
  • Files included: All build outputs except source maps and TypeScript build cache
  • Exclusions: .map, .tsbuildinfo, and .d.ts.map files

🔄 Updated automatically on each push to this PR

Copy link
Collaborator

@cerebrl cerebrl left a comment

Choose a reason for hiding this comment

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

This looks good to me.

@ancheetah ancheetah marked this pull request as ready for review July 9, 2025 15:53
@ancheetah ancheetah merged commit a369259 into main Jul 9, 2025
4 checks passed
@ancheetah ancheetah deleted the SDKS-4146-protect-collector branch July 9, 2025 15:56
@ryanbas21 ryanbas21 mentioned this pull request Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants