-
Notifications
You must be signed in to change notification settings - Fork 3
Create journey package #412
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
Changes from all commits
b60a5a3
b0f4368
703e47f
9972488
92ca83c
01a5d40
acb3df7
0f3a34b
15e7464
236f0d4
dba4466
4a3e393
5366be3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| '@forgerock/storage': minor | ||
| --- | ||
|
|
||
| feat: Update storage package | ||
|
|
||
| - Updated ESLint configurations for consistent code style and linting rules. | ||
| - Ensured compatibility with `verbatimModuleSyntax` by correcting type-only imports and module exports. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@forgerock/sdk-utilities': minor | ||
| --- | ||
|
|
||
| feat: Update SDK utilities | ||
|
|
||
| - Inlined `REQUESTED_WITH` and `X_REQUESTED_PLATFORM` constants with literal types for better tree-shaking and type narrowing. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| '@forgerock/iframe-manager': minor | ||
| --- | ||
|
|
||
| feat: Update iframe-manager | ||
|
|
||
| - Updated ESLint configurations for consistent code style and linting rules. | ||
| - Ensured compatibility with `verbatimModuleSyntax` by correcting type-only imports and module exports. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- | ||
| '@forgerock/journey-client': minor | ||
| --- | ||
|
|
||
| feat: Implement new journey client | ||
|
|
||
| - Implemented a new `journey()` factory function for creating stateful client instances. | ||
| - Integrated Redux Toolkit and RTK Query for robust state management and API interactions. | ||
| - Refactored `resume` logic to correctly persist and retrieve plain `Step` payloads, resolving prototype loss issues during serialization. | ||
| - Improved error handling and type safety within the client. | ||
| - Updated internal callback handling and device profiling integration. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- | ||
| '@forgerock/journey-client': minor | ||
| --- | ||
|
|
||
| feat(journey-client): Add WebAuthn, QR Code, and Recovery Code support | ||
|
|
||
| - Introduces new utility modules (`FRWebAuthn`, `FRQRCode`, `FRRecoveryCodes`) to handle advanced authentication methods within authentication journeys. | ||
| - Adds comprehensive parsing and handling for WebAuthn registration and authentication steps, including a fix for a type error where `TextOutputCallback` was being incorrectly inferred as `TextInputCallback`. | ||
| - Implements support for displaying QR codes (for both OTP and Push) and for displaying and using recovery codes. | ||
| - Includes extensive unit tests for the new callback types and utility modules to ensure correctness. | ||
| - Updates documentation to reflect the new capabilities and architectural changes. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| '@forgerock/sdk-types': minor | ||
| --- | ||
|
|
||
| feat: Update SDK types | ||
|
|
||
| - Updated ESLint configurations for consistent code style and linting rules. | ||
| - Ensured compatibility with `verbatimModuleSyntax` by correcting type-only imports and module exports. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| '@forgerock/sdk-logger': minor | ||
| --- | ||
|
|
||
| feat: Update SDK logger | ||
|
|
||
| - Updated ESLint configurations for consistent code style and linting rules. | ||
| - Ensured compatibility with `verbatimModuleSyntax` by correcting type-only imports and module exports. |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,36 @@ | ||
| # A more comprehensive Codecov configuration | ||
| codecov: | ||
| require_ci_to_pass: false | ||
| # Require CI to pass before Codecov processes reports. This ensures that | ||
| # coverage is only measured on successful builds. | ||
| require_ci_to_pass: true | ||
| notify: | ||
| wait_for_ci: false | ||
| # Wait for CI to finish before sending notifications. | ||
| wait_for_ci: true | ||
|
|
||
| coverage: | ||
| # Set a higher default target for project and patch coverage. | ||
| # This encourages a better testing culture. | ||
| status: | ||
| project: | ||
| default: | ||
| target: 40% | ||
| threshold: 1% | ||
| target: 70% | ||
| threshold: 2% # Allow for a small drop in coverage | ||
| patch: | ||
| default: | ||
| target: 40% | ||
| threshold: 1% | ||
| target: 80% # New code should be well-tested | ||
| threshold: 0% # Do not allow new code to decrease coverage | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| parsers: | ||
| v1: | ||
| include_full_missed_files: true | ||
|
|
||
| # Configure how coverage is displayed. | ||
| range: '70...100' | ||
| round: down | ||
| precision: 2 | ||
|
|
||
| # Ignore files that are not relevant for code coverage. | ||
| # This keeps the coverage report clean and focused on the source code. | ||
| ignore: | ||
| - '**/dist/**/*' | ||
| - '**/*.mock*' | ||
|
|
@@ -35,33 +48,37 @@ ignore: | |
| - '**/*.md' | ||
| - '**/LICENSE' | ||
| - '**/*.json' | ||
| - 'e2e/**/*' # E2E tests are not unit tests | ||
| - 'tools/**/*' # Tooling scripts | ||
| - 'scripts/**/*' # Other scripts | ||
|
|
||
| # Configure the comment that Codecov posts on pull requests. | ||
| comment: | ||
| layout: 'header, diff, files' | ||
| layout: 'header, diff, components, files' | ||
| behavior: default | ||
| require_changes: false | ||
| require_base: false | ||
| require_head: true | ||
| hide_project_coverage: false | ||
|
|
||
| bundle_analysis: | ||
| status: 'informational' | ||
| require_changes: false # Post a comment even if there are no coverage changes | ||
| require_head: true # Only post a comment if there is a coverage report for the head commit | ||
|
|
||
| flag_management: | ||
| component_management: | ||
| default_rules: | ||
| # Carry forward coverage from previous commits for all components. | ||
| carryforward: true | ||
| statuses: | ||
| - type: project | ||
| target: 40% | ||
| - type: patch | ||
| target: 40% | ||
| individual_flags: | ||
| - name: package-* | ||
| individual_components: | ||
|
Comment on lines
+62
to
+66
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chaincarryforward under component_management is likely ignored; move carryforward to flags or drop it. Docs show component_management supports paths/flag_regexes/statuses; carryforward is a Flags concept. If you need carryforward, configure it under flag_management and upload with flags, or remove here. Suggested removal: component_management:
default_rules:
- # Carry forward coverage from previous commits for all components.
- carryforward: trueIf you do want carryforward, introduce flags: flag_management:
default_rules:
carryforward: true
statuses:
- type: project
target: auto
threshold: 2%
- type: patch
target: 90%
threshold: 1%Refs: Components don’t require upload-time flags and their statuses mirror flag rules but don’t accept flags; carryforward is documented with flags. (docs.codecov.com) Run a quick YAML validation: 🏁 Script executed: #!/bin/bash
# Validate current codecov.yml against Codecov API
curl -sS https://api.codecov.io/validate \
-H "Content-Type: text/plain" \
--data-binary @codecov.yml | jq .Length of output: 56 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "---- codecov.yml (first 240 lines) ----"
if [ ! -f codecov.yml ]; then
echo "codecov.yml not found"
exit 0
fi
nl -ba codecov.yml | sed -n '1,240p'
echo
echo "---- occurrences of 'carryforward' ----"
rg -n "carryforward" -S || true
echo
echo "---- occurrences of 'component_management' ----"
rg -n "component_management" -S || true
echo
echo "---- show component_management context (if present) ----"
cm_line=$(rg -n "component_management" -S | head -n1 | cut -d: -f1 || true)
if [ -n "$cm_line" ]; then
echo "component_management appears at line: $cm_line"
nl -ba codecov.yml | sed -n "$((cm_line-3)),$((cm_line+40))p"
fiLength of output: 80 🏁 Script executed: #!/bin/bash
set -euo pipefail
if [ ! -f codecov.yml ]; then
echo "codecov.yml not found"
exit 0
fi
echo "---- codecov.yml (first 240 lines with numbers) ----"
awk '{printf "%5d: %s\n", NR, $0}' codecov.yml | sed -n '1,240p' || true
echo
echo "---- search for 'carryforward' and 'component_management' (with context) ----"
if command -v rg >/dev/null 2>&1; then
rg -n -C3 -S "carryforward|component_management" codecov.yml || true
else
grep -n -C3 -E "carryforward|component_management" codecov.yml || true
fi
echo
echo "---- component_management block (first match, +200 lines) ----"
if command -v rg >/dev/null 2>&1; then
cm_match=$(rg -n "^\s*component_management\s*:" -S codecov.yml | head -n1 || true)
else
cm_match=$(grep -n "^\s*component_management\s*:" codecov.yml | head -n1 || true)
fi
if [ -n "${cm_match:-}" ]; then
line=$(echo "$cm_match" | cut -d: -f1)
start=$((line-3)); if [ "$start" -lt 1 ]; then start=1; fi
end=$((line+200))
awk "NR>=$start && NR<=$end {printf \"%5d: %s\n\", NR, \$0}" codecov.yml || true
fiLength of output: 5205 Move/remove carryforward from component_management — it's ignored there. carryforward is a Flags/flag_management feature; component_management.default_rules accepts paths/flag_regexes/statuses and does not support carryforward. (docs.codecov.com) Action: remove this key or move it to flag_management.default_rules (or per-flag under flags). Location: codecov.yml lines 62–65. 🤖 Prompt for AI Agents |
||
| # This rule applies to all components that start with "package-". | ||
| # It is expected that the CI script uploads coverage reports with components | ||
| # like "package-davinci-client", "package-oidc-client", etc. | ||
| # This makes the configuration future-proof for new packages. | ||
| - component_id: package-* | ||
| paths: | ||
| - packages/*/ | ||
| carryforward: true | ||
| - packages/ # Only consider files in the packages directory for these components | ||
| statuses: | ||
| - type: project | ||
| target: 40% | ||
| target: 80% # Higher target for packages | ||
| threshold: 2% | ||
| - type: patch | ||
| target: 40% | ||
| target: 90% # New code in packages should be very well-tested | ||
| threshold: 0% | ||
|
|
||
| # Enable bundle analysis to track the size of the published packages. | ||
| bundle_analysis: | ||
| status: 'informational' | ||
Uh oh!
There was an error while loading. Please reload this page.